dataform icon indicating copy to clipboard operation
dataform copied to clipboard

Backslashes in regular expressions removed when running .ops.sql files.

Open jkukul opened this issue 4 years ago • 0 comments

Let's say I have a test.ops.sql file that looks like this:

SELECT regexp_extract('01a_data_engine', r'^(\d{2}\w)'),
              regexp_extract('01a_data_engine', '^(\\d{2}\\w)')

when running it (dataform run --actions test.ops.sql), what is actually executed in BQ:

SELECT regexp_extract('01a_data_engine', r'^(d{2}w)'),
              regexp_extract('01a_data_engine', '^(\d{2}\w)')

This looks very similar to https://github.com/dataform-co/dataform-web-tracking/issues/200 but applies to .ops.sql files.

jkukul avatar Dec 03 '21 18:12 jkukul