Hello,
I am trying to write a query with a text filter which acts as a placeholder to my aggregation level. Basically, it's a filter which can take the values 'day', 'week' and 'month' and specifies the aggregation level of my final query (giving a daily, weekly or monthly count). I need to use this placeholder filter twice in my query however I run into the following error:
ERROR: Assert Detail: ----------------------------------------------- error: Assert code: 1000 context: IsA(cons, Const) - query: 264826896 location: cg_expr_fn_builder.cpp:2645 process: padbmaster [pid=1073881217] -----------------------------------------------
The query looks something like this:
select date_trunc({{aggregation_level}}, "timestamp") as "date", date_add({{aggregation_level}},-1,"timestamp") as previous_dt
from my_table
I am using metabase v1.46.6.1 running Amazon Redshift.