mwtrew commented on issue #21793:
URL: https://github.com/apache/superset/issues/21793#issuecomment-2872038884

   > [@jkryanchou](https://github.com/jkryanchou), 
[@mwtrew](https://github.com/mwtrew) are you able to solve this issue? I am 
facing same issue.
   
   I can't remember exactly what the problem was, but I eventually got it 
working by omitting the `{% set ...}` lines at the top (which is what the 
documentation said to do, IIRC), and doing this instead:
   
   ```
   SELECT a 
   FROM b
   WHERE c
       {% if from_dttm %}
         AND timestamp >= '{{ from_dttm }}'::timestamp::date
       {% endif %}
       {% if to_dttm %}
         AND timestamp < '{{ to_dttm }}'::timestamp::date
       {% endif %}
   ```
   
   This works with both the dashboard filters and SQL lab Parameters on 
Superset v4.0.2.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to