joshtemple / lkml

A speedy LookML parser & serializer implemented in pure Python.
MIT License
166 stars 31 forks source link

Parser error when lookml view dimension labels contain double quotes #50

Closed YSArch closed 3 years ago

YSArch commented 3 years ago

File "/opt/python/lkml/parser.py", line 266, in parse_expression Error: Unable to find a matching expression for ''

Even the double quotes are escaped.

dimension: CA_34__MONITOR { sql: ${TABLE}."CA_34__MONITOR" ;; label: "34\" Monitor" type: yesno }

joshtemple commented 3 years ago

This looks like a bug. I’ll take a look tomorrow and see if I can push a fix.

On Sun, Feb 7, 2021 at 12:23 YSArch notifications@github.com wrote:

File "/opt/python/lkml/parser.py", line 266, in parse_expression Error: Unable to find a matching expression for ''

Even the double quotes are escaped.

dimension: CA_34__MONITOR { sql: ${TABLE}."CA_34__MONITOR" ;; label: "34\" Monitor" type: yesno }

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/joshtemple/lkml/issues/50, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCFHKY5OQKI4C46OS4GY7DS53D7VANCNFSM4XHVA27Q .

joshtemple commented 3 years ago

Hey @YSArch, I'm not able to reproduce this on the latest version (1.1). What version of lkml are you using? Some double quoting issues were fixed in #46, so you might just need to update.