You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "rumbin (via GitHub)" <gi...@apache.org> on 2023/12/06 09:50:25 UTC

[I] [Bug] Time filters are not injected into referenced virtual datasets [superset]

rumbin opened a new issue, #26195:
URL: https://github.com/apache/superset/issues/26195

   {{ from,_dttm }}`, `{{ to_dttm }}` or `{{ time_grain }} filters within a virtual dataset are not effective if this dataset is referenced (selected from) by another virtual dataset.
   
   #### How to reproduce the bug
   
   1. Create a virtual dataset which applies some push-down filtering by means of `{{ from,_dttm }}`, `{{ to_dttm }}` or `{{ time_grain }}`
   2. Create another virtual dataset which selects from the previously created dataset.
   3. Create a chart based on the second dataset and place it on a dashboard.
   4. Add a time range and/or a time grain filter to the dashboard and apply it.
   
   ### Expected results
   
   * The filter indicator reflects that the time range/grain filters are being applied to the chart on our dashboard.
   * The time filters are injected into the chart's query, deeply into the nested/referenced dataset.
   
   
   ### Actual results
   
   * Good: The filter indicator reflects that the time range/grain filters are being applied to the chart on our dashboard.
   * Bad: The time filters are _not_ injected into the nested/referenced dataset.
   
   #### Screenshots
   
   MWE:
   
   Dataset 1:
   ```sql
   SELECT
     '{{ from_dttm or "no_value_injected" }}' as from_dttm_of_nested_dataset
   ```
   
   Dataset 2:
   ```sql
   SELECT
     current_timestamp as main_dttm_column
     , '{{ from_dttm or "no_value_injected" }}' as from_dttm_of_main_dataset
     , from_dttm_of_nested_dataset
   from {{ dataset(590) }} -- adjust this ID to the one of Dataset 1 above
   ```
   
   Result:
   ![image](https://github.com/apache/superset/assets/1220356/53f025fa-2fcf-4762-8580-e2f4ae18babf)
   
   ![image](https://github.com/apache/superset/assets/1220356/4b5e8b61-7332-4936-ae3f-ad264d0532f7)
   
   The executed query shows that `{{ from_dttm }}` did not get injected into the nested dataset:
   ![image](https://github.com/apache/superset/assets/1220356/866b19c0-9e4e-4a26-8df6-f8c287f16d14)
   
   
   ### Environment
   
   (please complete the following information):
   
   - browser type and version:
   - superset version: 3.0.2
   - python version: `python --version`
   - node.js version: `node -v`
   - any feature flags active:
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't found one similar.
   
   ### Additional context
   
   It should be noted that other `filter_values()` _do~ get injected into nested/referenced datasets correctly. For these we only have the issue that the filter indicator doesn't reflect it properly: #26194.
   


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


Re: [I] [Bug] Time filters are not injected into referenced virtual datasets [superset]

Posted by "rumbin (via GitHub)" <gi...@apache.org>.
rumbin commented on issue #26195:
URL: https://github.com/apache/superset/issues/26195#issuecomment-2724102538

   Sorry, I had no time to test it.
   So I'm fine with closing the bug for now.
   I'll report back, once we upgraded our instances.


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


Re: [I] [Bug] Time filters are not injected into referenced virtual datasets [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #26195:
URL: https://github.com/apache/superset/issues/26195#issuecomment-2722761462

   Never heard back on the prior validation request almost a year ago, so I'll close this as stale. 


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


Re: [I] [Bug] Time filters are not injected into referenced virtual datasets [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #26195: [Bug] Time filters are not injected into referenced virtual datasets
URL: https://github.com/apache/superset/issues/26195


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


Re: [I] [Bug] Time filters are not injected into referenced virtual datasets [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #26195:
URL: https://github.com/apache/superset/issues/26195#issuecomment-2065427464

   Is this still happening in 3.1/4.0 (our currently supported versions)?
   
   CC @villebro in case you have any insight here. 
   
   


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