-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jinja Template not working in case of view query #8892
Comments
Issue-Label Bot is automatically applying the label Links: app homepage, dashboard and code for this bot. |
You can look at the generated query to debug similar problems (right hand corner in Explore view). Can you post the generated query here? |
@villebro i did look at the query generated here is the diff
As you can see here what i am trying to point out using a view on the datasource makes it fill the value in the template as well as apply the filter, while using the table directly as datasource does not add extra filter |
@villebro @mistercrunch can you guys help |
@saurabh1-singh thanks for the additional context. If I understand what you've done, you're doing something pretty clever with the filter box, for which it hasn't really been designed. Or rather, the problem isn't so much the filter box itself, but the fact that the Ultimately though, I think you're actually looking for something similar to what's discussed in #8452 , i.e. a component that makes it possible to define more fine grained filtering than is currently offered by existing components. Am I correct? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue |
When I put the jinja template inside a filter after selecting a table data source directly and then use a filter box to fill those values at runtime it works fine. But when I create a advanced query i.e. view, then the same thing does not work.

In the above screenshot you can see the chart test_char is loaded fine but not the test_c_1
The above one is test_c_1 with a advanced query/view
Expected results
I expected both to work similarly
Actual results
Did not happen in case of view it also creates an extra filter with the name of the filter in filter box and try it apply it too
Screenshots
If applicable, add screenshots to help explain your problem.
How to reproduce the bug
Environment
(please complete the following information):
superset version
python --version
node -v
npm -v
Checklist
Make sure these boxes are checked before submitting your issue - thank you!
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: