You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "pmainguet (via GitHub)" <gi...@apache.org> on 2024/03/29 15:23:58 UTC
[I] Superset Dashboard with native filter does not correctly update when opened [superset]
pmainguet opened a new issue, #27787:
URL: https://github.com/apache/superset/issues/27787
### Bug description
Hello Superset team
I have a dashboard with native filters on two dimensions ComId and Country that I access via the following URL:
http://xxx.com/dashboard/74/?standalone=2&native_filters=(NATIVE_FILTER-4muGsWvuM:(cache:(label:%27fr%27,validateStatus:!f,value:!(%27fr%27)),extraFormData:(filters:!((col:country,op:IN,val:!(%27fr%27)))),filterState:(label:%27fr%27,validateStatus:!f,value:!(%27fr%27)),id:NATIVE_FILTER-4muGsWvuM,ownState:()),NATIVE_FILTER-mV48ONcz5:(cache:(label:%27100565400%27,validateStatus:!f,value:!(%27100565400%27)),extraFormData:(filters:!((col:merchant_id,op:IN,val:!(%27100565400%27)))),filterState:(label:%27100565400%27,validateStatus:!f,value:!(%27100565400%27)),id:NATIVE_FILTER-mV48ONcz5,ownState:()))
The dashboard open corretly, the filters are correctly set on the left side of the screen, but the filters are not applied to the data. I need to click on "Apply Filters" to have the correct view.
Step 1 - All panels load

Step 2 - Unfiltered data loads

Step 3 - Filters load on the left side

Step 4 - Correct view after clicking on Apply Filters

I believe it is due to the fact the unfiltered data is first loaded and then the filters are set in the dropdown.
I tried to use Jinja templating in my queries to force loading the filtered data but in that case i get an error, as the filters are not set hence my Jinja templates are empty.
Is there a way to autorefresh the dashboard after the filters are set to get the filtered view right away, or another work around ?
Tested on Superset 2 and 3
Thanks in advance
### How to reproduce the bug
Open a dashboard with native filters
### Screenshots/recordings
_No response_
### Superset version
master / latest-dev
### Python version
3.9
### 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.
- [X] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [X] 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: 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] Superset Dashboard with native filter does not correctly update when opened [superset]
Posted by "ftwegner (via GitHub)" <gi...@apache.org>.
ftwegner commented on issue #27787:
URL: https://github.com/apache/superset/issues/27787#issuecomment-2146107041
I got the automatic filtering solved. I found the problem. It was sitting before the keyboard. In the URL I was using the wrong value for the <column> parameter. When applying the "name" tag as <column> the filtering works as expected, see the screenshot below. The code from the article [Apache Superset — Use URL to filter dashboards](https://www.blef.fr/superset-filters-in-url/) works exactly as I need it now.
`native_filters=(NATIVE_FILTER-<id>:(__cache:(label:'<value>',validateStatus:!f,value:!('<value>')),extraFormData:(filters:!((col:<column>,op:IN,val:!('<value>')))),filterState:(label:'<value>',validateStatus:!f,value:!('<value>')),id:NATIVE_FILTER-<id>,ownState:()))`

--
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] Superset Dashboard with native filter does not correctly update when opened [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #27787:
URL: https://github.com/apache/superset/issues/27787#issuecomment-2147983139
And it applies automatically? Does that effectively close this issue?
--
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] Superset Dashboard with native filter does not correctly update when opened [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #27787:
URL: https://github.com/apache/superset/issues/27787#issuecomment-2145830476
It may also be worth noting that when you configure dashboard filters, you can set default values, and these are automatically applied. That may or may not help, depending on your use case.
--
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] Superset Dashboard with native filter does not correctly update when opened [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #27787: Superset Dashboard with native filter does not correctly update when opened
URL: https://github.com/apache/superset/issues/27787
--
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] Superset Dashboard with native filter does not correctly update when opened [superset]
Posted by "ftwegner (via GitHub)" <gi...@apache.org>.
ftwegner commented on issue #27787:
URL: https://github.com/apache/superset/issues/27787#issuecomment-2144351803
Here is a response from a Apache Superset PMC member:
> As the GitHub issue's open status indicates, this is sadly not supported at this time. I don't think it's on anyone's near-term roadmap that I'm aware of, either. This is one of those "contributions welcome" areas if you have any engineering support in your org that might be able to contribute such a feature (e.g. an "applyFiltersInstantly=true" URL param or something along those lines.
--
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] Superset Dashboard with native filter does not correctly update when opened [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #27787:
URL: https://github.com/apache/superset/issues/27787#issuecomment-2744518352
It's been 9 months, so I'll assume we're all good here :) Closing. Thanks!
--
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