Keveen-ghori opened a new issue, #32912:
URL: https://github.com/apache/superset/issues/32912

   ### Bug description
   
   Sql Query:
   
             {% set time_filter = get_time_filter("order_date", 
remove_filter=True) %}
             {% set from_expr = time_filter.from_expr %}
             {% set to_expr = time_filter.to_expr %}
             {% set time_range = time_filter.time_range %}
             SELECT
               *,
               '{{ time_range }}' as applied_time_range
             FROM cleaned_sales_data
             WHERE 1 = 1
             {% if from_expr %}AND order_date >= {{ from_expr }}{% endif %}
             {% if to_expr %}AND order_date < {{ to_expr }}{% endif %}
   
   Template parameters:
   
             {
               "_filters": [
                 {
                   "col": "order_date",
                   "op": "TEMPORAL_RANGE",
                   "val": "2003-01-01 : 2003-12-31"
                 }
               ]
             }
   
   Error:
   
             Parameter error
             Failed to execute query '12' - '{% set time_filter = 
get_time_filter("order_date", remove_filter=True) %}
             {% set from_expr = time_filter.from_expr %}
             {% set to_expr = time_filter.to_expr %}
             {% set time_range = time_filter.time_range %}
             SELECT
               *,
               '{{ time_range }}' as applied_time_range
             FROM cleaned_sales_data
             WHERE 1 = 1
             {% if from_expr %}AND order_date >= {{ from_expr }}{% endif %}
             {% if to_expr %}AND order_date < {{ to_expr }}{% endif %}': The 
query contains one or more malformed 
             template parameters. 
              Please check your query and confirm that all template parameters 
are surround by double braces, for 
              example, "{{ ds }}". Then, try running your query again.
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   4.1.2
   
   ### Python version
   
   3.11
   
   ### Node version
   
   16
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [x] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [ ] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [ ] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section.


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