Dashboard filters scopes are not carried while export/import dashboards
We are currently using Superset 1.4.2 (but we just checked it also with the 1.5.0 version) and we are experiencing an issue while exporting and importing a dashboard. The filters defined ad the dashboard level don't follow the scoping defined. They are automatically applied to all charts, even if a different scoping was defined before the export.
How to reproduce the bug
- Focus on a Dashboard you want, and export it (you will download the JSON file)
- Hover on Settings and select Import Dashboards
- Choose the JSON file you previously downloaded and select the database you want the dashboard to point to
- Click on Upload.
- Move to the imported dashboard
- Expand the dashboard's filters section
Expected results
We expect to have the same scoping as in the original dashboard for the filters
Actual results
The scoping is not carried while the export, so all the filters are automatically applied to all the charts.
Environment
(please complete the following information):
- superset version: 1.4.2
- any feature flags active: We currently have the VERSIONED_EXPORT feature flag disabled.
Checklist
Make sure to follow these steps before submitting your issue - thank you!
- [ ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
- [ ] I have reproduced the issue with at least the latest released version of superset.
- [ ] I have checked the issue tracker for the same issue and I haven't found one similar.
+1
+1
+1
Working as Expected. Loom video:- https://www.loom.com/share/748dad4825c148678c5b73f0a5fbf042
facing the same problem while import from v1.5.0 to v2.1.0. Also there is a notice appear everytime accessing to the imported dashboard: Error loading chart datasources. Filters may not work correctly. Although I have changed the scope as it is as the old dashboard and it work just fine as the old one. This notice confuse users and annoyin.
Facing the same issue with Cross Filter scoping. Steps to reproduce:
- Create a dashboard with more than one or two chart. (My dashboard was with 3 tabs and 6 charts.)
- enable cross filter
- Restrict cross-filtering for any chart to none. That is, Apply to specific panels -> deselect all panels
- Export the dashboard
- Delete the dashboard and their corresponding charts
- Import dashboard
Actual result:
Cross filter scoping will remain
Apply to all panelsfor all charts.
Expected result: Import should preserve the cross filter scoping for a chart.
Observation: Importing the dashboard seems to assign the new chart ids. Check the properties of a dashboard (edit dashboard -> edit properties -> advance JSON metadata)
"chart_configuration": {
"1": {
"id": 1,
"crossFilters": {
"scope": {"rootPath": [], "excluded": [1]},
"chartsInScope": []
}
},
"2": {
"id": 2,
"crossFilters": {
"scope": {"rootPath": [], "excluded": [2]},
"chartsInScope": []
}
},
"3": {
"id": 3,
"crossFilters": {
"scope": {"rootPath": ["ROOT_ID"], "excluded": [3]},
"chartsInScope": [1, 2, 4, 5, 6]
}
},
"4": {
"id": 4,
"crossFilters": {
"scope": {"rootPath": ["ROOT_ID"], "excluded": [4]},
"chartsInScope": [1, 2, 3, 5, 6]
}
},
"5": {
"id": 5,
"crossFilters": {
"scope": {"rootPath": [], "excluded": [5]},
"chartsInScope": []
}
},
"6": {
"id": 6,
"crossFilters": {
"scope": {"rootPath": [], "excluded": [6]},
"chartsInScope": []
}
},
"37": {
"id": 37,
"crossFilters": {
"scope": {"rootPath": ["ROOT_ID"], "excluded": [37]},
"chartsInScope": [38, 39, 40, 41, 42]
}
},
"38": {
"id": 38,
"crossFilters": {
"scope": {"rootPath": ["ROOT_ID"], "excluded": [38]},
"chartsInScope": [37, 39, 40, 41, 42]
}
},
"39": {
"id": 39,
"crossFilters": {
"scope": {"rootPath": ["ROOT_ID"], "excluded": [39]},
"chartsInScope": [37, 38, 40, 41, 42]
}
},
"40": {
"id": 40,
"crossFilters": {
"scope": {"rootPath": ["ROOT_ID"], "excluded": [40]},
"chartsInScope": [37, 38, 39, 41, 42]
}
},
"41": {
"id": 41,
"crossFilters": {
"scope": {"rootPath": ["ROOT_ID"], "excluded": [41]},
"chartsInScope": [37, 38, 39, 40, 42]
}
},
"42": {
"id": 42,
"crossFilters": {
"scope": {"rootPath": ["ROOT_ID"], "excluded": [42]},
"chartsInScope": [37, 38, 39, 40, 41]
}
}
}
The chart ids 1, 2, 3, 4, 5, 6 were the old chart ids when I exported the dashboard first time. It has correct cross-filter scoping. Deleting a dashboard and corresponding charts, importing the dashboard generates new chart ids (from 37 to 42) and assigns apply to all panels cross filter scoping to all charts.
If you export the dashboard again, you can able to see the new chart ids in the dashboard's yaml file.
facing the same problem while import from v1.5.0 to v2.1.0. Also there is a notice appear everytime accessing to the imported dashboard: Error loading chart datasources. Filters may not work correctly. Although I have changed the scope as it is as the old dashboard and it work just fine as the old one. This notice confuse users and annoyin.
I have to go to every chart and click Save again to make the notification dissapear.
Facing the same issue with Cross Filter scoping. Steps to reproduce:
- Create a dashboard with more than one or two chart. (My dashboard was with 3 tabs and 6 charts.)
- enable cross filter
- Restrict cross-filtering for any chart to none. That is, Apply to specific panels -> deselect all panels
- Export the dashboard
- Delete the dashboard and their corresponding charts
- Import dashboard Actual result: Cross filter scoping will remain
Apply to all panelsfor all charts.Expected result: Import should preserve the cross filter scoping for a chart.
Observation: Importing the dashboard seems to assign the new chart ids. Check the properties of a dashboard (edit dashboard -> edit properties -> advance JSON metadata)
The chart ids 1, 2, 3, 4, 5, 6 were the old chart ids when I exported the dashboard first time. It has correct cross-filter scoping. Deleting a dashboard and corresponding charts, importing the dashboard generates new chart ids (from 37 to 42) and assigns
apply to all panelscross filter scoping to all charts. If you export the dashboard again, you can able to see the new chart ids in the dashboard's yaml file.
I guess this was because the Superset launching by docker already have chart ids from 1 to 36 as example charts
I guess this was because the Superset launching by docker already have chart ids from 1 to 36 as example charts
Yes, still it should preserve the scoping of cross filters with import functionality. I tried modifying the yaml file with higher chartIds (superset doesn’t have it already) but still it assigns new IDs and may be cross filter scoping isn’t bind with chart Ids. Apparently native filters scoping works fine but not cross filter scoping.
"chart_configuration": {
"49": {
"id": 49,
"crossFilters": {
"scope": {"rootPath": ["ROOT_ID"], "excluded": [49]},
"chartsInScope": [50, 51, 52, 53, 54]
}
},
"50": {
"id": 50,
"crossFilters": {
"scope": {"rootPath": ["ROOT_ID"], "excluded": [50]},
"chartsInScope": [49, 51, 52, 53, 54]
}
},
"51": {
"id": 51,
"crossFilters": {
"scope": {"rootPath": ["ROOT_ID"], "excluded": [51]},
"chartsInScope": [49, 50, 52, 53, 54]
}
},
"52": {
"id": 52,
"crossFilters": {
"scope": {"rootPath": ["ROOT_ID"], "excluded": [52]},
"chartsInScope": [49, 50, 51, 53, 54]
}
},
"53": {
"id": 53,
"crossFilters": {
"scope": {"rootPath": ["ROOT_ID"], "excluded": [53]},
"chartsInScope": [49, 50, 51, 52, 54]
}
},
"54": {
"id": 54,
"crossFilters": {
"scope": {"rootPath": ["ROOT_ID"], "excluded": [54]},
"chartsInScope": [49, 50, 51, 52, 53]
}
},
"501": {
"id": 501,
"crossFilters": {
"scope": {"rootPath": [], "excluded": [501]},
"chartsInScope": []
}
},
"502": {
"id": 502,
"crossFilters": {
"scope": {"rootPath": [], "excluded": [502]},
"chartsInScope": []
}
},
"503": {
"id": 503,
"crossFilters": {
"scope": {"rootPath": ["ROOT_ID"], "excluded": [503]},
"chartsInScope": [501, 502, 504, 505, 506]
}
},
"504": {
"id": 504,
"crossFilters": {
"scope": {"rootPath": ["ROOT_ID"], "excluded": [504]},
"chartsInScope": [501, 502, 504, 505, 506]
}
},
"505": {
"id": 505,
"crossFilters": {
"scope": {"rootPath": [], "excluded": [505]},
"chartsInScope": []
}
},
"506": {
"id": 506,
"crossFilters": {
"scope": {"rootPath": [], "excluded": [506]},
"chartsInScope": []
}
}
}
facing the same problem while import from v1.5.0 to v2.1.0. Also there is a notice appear everytime accessing to the imported dashboard: Error loading chart datasources. Filters may not work correctly. Although I have changed the scope as it is as the old dashboard and it work just fine as the old one. This notice confuse users and annoyin.
I have checked with import a dashboard from v1.5.0 to v2.1.0.It is working as expected.I didn't see all the filters are automatically applied to all the charts.
facing the same problem while import from v1.5.0 to v2.1.0. Also there is a notice appear everytime accessing to the imported dashboard: Error loading chart datasources. Filters may not work correctly. Although I have changed the scope as it is as the old dashboard and it work just fine as the old one. This notice confuse users and annoyin.
I have checked with import a dashboard from v1.5.0 to v2.1.0.It is working as expected.I didn't see all the filters are automatically applied to all the charts.
My v.1.5.0 was built from scratch, and v.2.1.0 was deploy from docker, don't know is it because of this so I got the annoying notification and filters apply all charts
This issue still exists in 3.0.0 also, we are facing same issue. not able to export and import. this feature is non usable now.
I assume this still happens in 3.1/4.0, but if anyone can confirm or deny it, it would be appreciated, since we officially no longer support 3.0 or prior.
Still happening with 4.0.2. We have a dev and prod setup and changes done in dev are exported -> imported into prod but all cross filter is lost which forces manual changes. As we are growing to 50+ dashboards things got out of control and we cannot proceed doing it manually.