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 2021/10/29 10:23:20 UTC

[GitHub] [superset] farming4rd edited a comment on issue #17247: Unable to Use Jinja Filters for a Specific Column in k8s with helm template but running well with docker.

farming4rd edited a comment on issue #17247:
URL: https://github.com/apache/superset/issues/17247#issuecomment-954628990


   > @farming4rd please add a redacted copy of your original query including the jinja expression. Also, it is very helpful if you can create a reproducible example using the example datasets/charts/dashboards.
   
   hear my original query
   
   ```
   {% if url_param('target_date') != None %}
     {% set selected_date = url_param('target_date') %}
   {% else %}
     {% set selected_date = "" %}
   {% endif %}
   with planned_bookings as (
     select scp.br_code, scp.br_name, scp.cl_code, scp.cl_name, 
       to_char(scp.target_date, 'YYYY-MM-DD') as target_date, scp.start_time, scp.end_time, 
       scp.target_sum as plan_book, scp.target_amount as plan_amount
     from superset_schema.sic_collection_plan scp
     order by scp.br_name, scp.cl_name, scp.target_date, scp.start_time
   )
   {% if selected_date != "" %}
     select * from planned_bookings
     where target_date = '{{selected_date}}' 
   {% else %}
     select * from planned_bookings
   {% endif %}
   ```
   
   thank you v@villebro


-- 
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: notifications-unsubscribe@superset.apache.org

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