-
Notifications
You must be signed in to change notification settings - Fork 314
Description
Related to closed issue :
#5262
Has this been released? I can't find these changes in the releases and still have issues using latest version
The issue appears to be that SQLMesh is incorrectly parsing `ARRAY_AGG(STRUCT(...))
Column custom_fields contains an aggregation function, which is not allowed in GROUP BY at [1:695]The commented out line of code works fine in bq sql dbt.
I had to create a new structure to make it work (but it shouldn't work that way).SELECT
task_id
--, ARRAY_AGG(custom_field) AS custom_fields this line should work as do with dbt
, ARRAY_AGG(
STRUCT(
custom_field.id,
custom_field.type,
custom_field.name,
custom_field.required,
custom_field.value,
custom_field.reference
)
) AS custom_fields
FROM custom_fields
GROUP BY task_id
Thanks in advance for help!