{{ from_dttm }}
and {{ to_dttm }}
Jinja special variables are not rendered in Custom SQL metrics
#19564
Closed
3 tasks done
When using Jinja special variables in Custom SQL metrics (Explore Panel),
{{ from_dttm }}
and{{ to_dttm }}
are not rendered — unlike, say,{{ current_user_id() }}
.How to reproduce the bug
Turn Jinja templating feature flag on:
a.
MIN({{ current_user_id() }})
b.
MIN('{{ from_dttm }}')
Expected results
Both definitions to return a number.
Actual results
MIN({{ current_user_id() }})
returns a result:by executing the following query
MIN('{{ from_dttm }}')
returns “No Data” (even with a Time Range filter set).executing this query:
Environment
(please complete the following information):
1.4.1
(and also on https://c96e35bc.us2a.app.preset.io/ on 2022-04-06)3.7.3
Checklist
Make sure to follow these steps before submitting your issue - thank you!
Additional context
{{ from_dttm }}
is using single quotes (i.e.sum('{{ from_dttm }}')
). Indeed, both{{ from_dttm }}
(no quotes) or"{{ from_dttm }}"
(double quotes) yield an error.The text was updated successfully, but these errors were encountered: