Time dimension on a runningTotal measure on Snowflake mixes quoted and unquoted columns #3452
Labels
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Community contributions are welcome.
Describe the bug
Using a time dimension on a runningTotal measure on Snowflake mixes quoted and unquoted columns in the query. This fails the query, because Snowflake has specific rules about quoted columns. Specifically:
So "date_from" <> date_from
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should not create an error. I would suggest adding the column aliases to "OFFERINGS.firstTradeDate_series" and quote date_to and date_from. When I do that, the query runs fine.
Screenshots

Version:
28.32 according to running /usr/local/bin/cubejs --version on the Latest Docker version
Additional context
This is the generated query. Notice that line 2 quotes "date_from", but but when the aliases are created, they are not quoted. In snowflake, this means they are not the same column.
Also,
Snowflake requires the column aliases for "OFFERINGS.firstTradeDate_series". I tested this and was surprised. When we add the column type in the select query, the parent subquery does not inherit the column name. I pasted a simpler query below to show what Snowflake expects.
The text was updated successfully, but these errors were encountered: