jinja templating not working (1.2.0-rc2) requires undocumented config
See original GitHub issueExpected results
Following documentation, running for instance this query should work (from sql lab)
SELECT *
FROM mytable
WHERE username = '{{ current_username() }}'
should work and return results.
Actual results
{{ current_username() }}
is not interpreted at all, is considered as a String. Hence the result does not work.
Note that '{{ url_param('myparam') }}'
does not work either
looks like no templating interpretation is done.
Used to work fine in 0.38
Does not work in 1.2.0-RC2
I don’t know where to look for detailed executions logs. I had a look un query
table of superset
schema, query was not traced interpreted there but maybe it’s the expected result.
Screenshots
If applicable, add screenshots to help explain your problem.
How to reproduce the bug
- Go to ‘SQL Lab’
- Enter a query using Jinja templating
- See issue
Environment
(please complete the following information):
- superset version:
Superset 1.2.0
(1.2.0-RC2 actually) - python version:
Python 3.7.9
- node.js version: not present in container
Checklist
Make sure to follow these steps before submitting your issue - thank you!
- I have checked the superset logs for python stacktraces and included it here as text if there are any.
- I have reproduced the issue with at least the latest released version of superset.
- I have checked the issue tracker for the same issue and I haven’t found one similar.
Additional context
Add any other context about the problem here.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
Hope this can help. #15246
for the records, this works in
superset_config.py
It should really be added here : https://superset.apache.org/docs/installation/sql-templating
BUT it still doesn’t work in SQL LAB. It works when used elsewhere