You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "TheHassi (via GitHub)" <gi...@apache.org> on 2023/04/27 12:11:51 UTC
[GitHub] [superset] TheHassi opened a new issue, #23846: When using JINJA template, Dashboard Filter writes the WHERE STATEMENT in SQL query
TheHassi opened a new issue, #23846:
URL: https://github.com/apache/superset/issues/23846
I want to use the Dashboard-Filters, but the column format is an array. For this issue, I want to use JINJA templates.
The Flag is enabled: "ENABLE_TEMPLATE_PROCESSING": True
**The SQL Statement from the virtual dataset:**
`SELECT * FROM behandlungsdauer
{% if (filter_values('ix')|length) %}
WHERE ix @> '{{ ' {\"' + '\",\"' .join(filter_values('ix', remove_filter=True)) + '\"}' }}'
{% else %}
{% endif %}`
**The Dashboard with Filters:**
![grafik](https://user-images.githubusercontent.com/72858776/234853144-beab7c84-6977-4928-802c-730b3c151992.png)
**The SQL query, when filter applied:**
`SELECT # Something
FROM
(SELECT *
FROM behandlungsdauer
WHERE ix @> ' {"6"}') AS virtual_table
WHERE ix IN (6) #do not want this line as JINJA is already applied above
AND kohorte = 9
AND zeit NOT IN ('2. Jahr',
'3. Jahr',
'4. Jahr')
GROUP BY zeit
ORDER BY "KG (b1)" DESC
LIMIT 10000;`
What can I do to Solve this issue?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] When using JINJA template, Dashboard Filter writes the WHERE STATEMENT in SQL query [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #23846: When using JINJA template, Dashboard Filter writes the WHERE STATEMENT in SQL query
URL: https://github.com/apache/superset/issues/23846
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] nicolaspi commented on issue #23846: When using JINJA template, Dashboard Filter writes the WHERE STATEMENT in SQL query
Posted by "nicolaspi (via GitHub)" <gi...@apache.org>.
nicolaspi commented on issue #23846:
URL: https://github.com/apache/superset/issues/23846#issuecomment-1528858466
You need to disable application of this filter on the chart in the filter editor.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] When using JINJA template, Dashboard Filter writes the WHERE STATEMENT in SQL query [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #23846:
URL: https://github.com/apache/superset/issues/23846#issuecomment-1965495540
I hope the answer above sufficed! Closing this as stale since it's been silent for so long, and we're trying to steer toward a more actionable Issues backlog. If people are still encountering this in current versions (currently 3.x) please re-open this issue, open a new Issue with updated context, or raise a PR to address the problem. Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org