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 2020/09/08 10:41:29 UTC

[GitHub] [incubator-superset] ebuildy commented on pull request #5547: Adds a new macro to allow getting filter values easily

ebuildy commented on pull request #5547:
URL: https://github.com/apache/incubator-superset/pull/5547#issuecomment-688783431


   > SELECT action,
   > count(*) as times
   > FROM logs
   > WHERE action in ( {{ "'" + "','".join(filter_values('action_type')) + "'" }} )
   > GROUP BY 1
   > It is not giving any result set in sql lab. can you explain where to write
   
   I guess this was a dummy example, in a real life, wrap it between condition:
   
   ```
   {% if filter_values('Product type') | length %}
   WHERE shop_order_detail.product_type in ( {{ "'" + "','".join(filter_values('Product type')) + "'" }} )
   {% endif %}
   ```


----------------------------------------------------------------
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.

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