cachafla commented on issue #8183: How to pass time filters to SQL Lab queries URL: https://github.com/apache/incubator-superset/issues/8183#issuecomment-535706757 > Can you post a case where a jinja-based date filter needs to be used? I'm not saying there isn't one, but as the majority of modern engines are able to do predicate pushdown into the subquery, the need for injecting date filters should be very uncommon. If I understood your example correctly, the original query > > ```sql > SELECT * > FROM table > ``` > > should turn into > > ```sql > SELECT cols > FROM > (SELECT * > FROM table) AS expr_qry > WHERE <time filters> > ``` > > when a filter box emits a time filter, i.e. the time filter will be appended to the query without the need for jinja trickery. Correct @villebro, this solves the issue whenever `timestamp` is a column returned by the query. My current struggle is that I have more complex aggregations that can return, say, a single number. Example: get the average time it takes for users to do X. The `timestamp` filters would need to be applied somewhere inside the original SQL because the query would return a single row of aggregated data. Does that make sense?
---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
