You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/08/02 10:45:51 UTC
[GitHub] mjsilva opened a new pull request #5547: Adds a new macro to allow
getting filters and extra_filters value in an easy way
mjsilva opened a new pull request #5547: Adds a new macro to allow getting filters and extra_filters value in an easy way
URL: https://github.com/apache/incubator-superset/pull/5547
We've added a new macro `filter_values` to make it easy to grab the values of a filter box when writing dynamic filter dependent queries.
Usage:
```
SELECT action,
count(*) as times
FROM logs
WHERE action in ( {{ filter_values('action_type') }} )
GROUP BY 1
```
Returns:
```
SELECT action,
count(*) as times
FROM logs
WHERE action in ( "foo", "bar" )
GROUP BY 1
```
When filter box is like this:

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org