Jinja execution is not happening when a dataset "sync columns" feature is used
A clear and concise description of what the bug is.
How to reproduce the bug
- Go to a dataset which implements time filter 'from_dttm'/'to_dttm' jinja values to use them in the dataset.
- Click edit button on dataset
- Click on third tab "COLUMNS" (Refer the screenshot below)
- Click on "SYNC COLUMNS FROM SOURCE"
- Query throws the error about syntax error because does not execute Jinja
Expected results
It should sync the columns without any error
Actual results
Generate SQL syntax error as Jinja is not native to SQL.
Screenshots
Environment
Feature flags:
ENABLE_TEMPLATE_PROCESSING=True
Thanks for reporting. This behavior has existed for a while but I don't think is clearly documented like this. I use this workaround to sync columns: https://github.com/apache/superset/issues/21793#issuecomment-1384138580 Basically, delete the Jinja, sync columns, re-paste the Jinja again. But ideally having Jinja templating would not break the sync columns function.
It's been about 5 months since this thread was last touched. Can anyone confirm if the issue still exists in 3.1.2 or 4.0? Otherwise this is at risk of being closed as stale, in assumption that the workaround is good enough for now :)
The issue still exists at least in 3.1.1. I can't tell if a fix is available in last releases just looking at the changelogs.