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 2019/09/25 19:18:31 UTC

[GitHub] [incubator-superset] suvarnaC commented on issue #8183: How to pass time filters to SQL Lab queries

suvarnaC commented on issue #8183: How to pass time filters to SQL Lab queries
URL: https://github.com/apache/incubator-superset/issues/8183#issuecomment-535171496
 
 
   > 
   > 
   > @cachafla I've written a Jinja addon with the `get_since_until` utility function to do just this. If there's interest in this I'd be happy to make a PR.
   > 
   > **Usage**
   > 
   > A query on a dashboard with my addon directly preceding the time field:
   > 
   > ```
   > SELECT *
   > FROM table
   > WHERE changed_on {{ time_filter() }}
   > ```
   > 
   > With this dashboard filter set:
   > ![Screen Shot 2019-09-06 at 4 24 43 PM](https://user-images.githubusercontent.com/45610410/64465682-e3777380-d0c2-11e9-9fd1-beca221f031b.png)
   > 
   > Results in SQL like this:
   > 
   > ```
   > SELECT *
   > FROM table
   > WHERE changed_on BETWEEN "2018-09-06T00:00:00" AND "2019-09-06T00:00:00"
   > ```
   
   I am interested in this capability, did you create a PR?

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org