You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "davidriverapericas (via GitHub)" <gi...@apache.org> on 2025/02/21 14:00:27 UTC

Re: [I] time_grain variable (sql templating) is always None [superset]

davidriverapericas commented on issue #31446:
URL: https://github.com/apache/superset/issues/31446#issuecomment-2674628014

   Hi all
   
   Is it going to be fixed soon?
   
   In my case, we are using the "time_grain" in our Datasets with jinja with 
   `/*
   Time grain: {{ time_grain }}
   */`
   
   but it always returns None
   
   `
   /*
   Time grain: None
   */
   `
   We are using this for example in a Table chart. When we set the Time Grain to "Month" for example, the Dataset (expecting the "time_grain" to be "P1M" would group the rows by months, but as a default we group the rows by days. So, as time_grain is None, it returns rows per day.
   
   But on the other side, the table chart is rendering the date column taking into account the granularity:
   
   ![Image](https://github.com/user-attachments/assets/b4a9b458-6bd7-416d-baa9-fd176d69ea1b)
   
   resulting the chart displaying wrong information.
   
   I hope this is fixed very soon
   Cheers
   
   David


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