Currently using BigQuery From google. My legacy query looks like:
Select * FROM FLATTEN(FLATTEN([DB.table1], record.atr), record.atr.value)
WHERE record.atr.value IN "1"
I understand BigQuery now automatically flattens tables so i thought this would do the trick:
SELECT * FROM `DB.table1`
WHERE record.atr.value IN "1"
However i get an error Error: Cannot access field value on a value with type ARRAY, sv ARRAY, ...>> at [2:17]
How can i convert this to Standard SQL query?