Last week I had to parametrize a customSQL for BigQuery. I had to pick tables named clientId_yyyyMM for last semester.
When I wanted to create a regex like '(2015)(01|02|03)' I couldn't add that String as a parameter to BigQuery customSQL (several different errors depending on how I typed it)
Then I tried with 'CONTAINS' clause in BQ. But there was no way I could make a single parameter work.
What I could do to make it work is to use 6 different string parameters like this
table_id CONTAINS STRING(parameter1) OR
table_id CONTAINS STRING(parameter2) OR
table_id CONTAINS STRING(parameter3) OR
table_id CONTAINS STRING(parameter4) OR
table_id CONTAINS STRING(parameter5) OR
table_id CONTAINS STRING(parameter6)
Which, as you can see, its not elegant and requires me to update 6 different parameters (scalability?).
Is there anybody who has worked with BQ in tableau and had to parametrize things? how did you do to make regex/contains work with more than 1 parameter?
I wanted to add examples, but tableau decided to delete all my calculated fields (which had as comments the options I tried :@ ) because the data source changed (I didn't change it -.-)
Did you find a solution to this issue with Big Query?