Unable to import a bundle without all dependencies included #31443
Labels
api:dashboard
Related to the REST endpoints of the Dashboard
dashboard:import
Related to importing dashboards
viz:charts:import
Related to importing charts
Bug description
The example below is discussing the use case for
/api/v1/assets/import
but similar logic appears in theImport*Command
method for dataset/chart/dashboard specific APIs and methods...When trying to use
/api/v1/assets/import/
to import a dashboard, it forces all resources to be imported.If we look at the implementation, it reads something like this. Within each 'startwith' block in maintains a dict
of all the updated resources, and in the subsequent block it uses this as a lookup (only the code in the datasets block
is shown)
Unfortunately this means that any dashboard update must also include the chart, dataset, query and database.
Whilst I can understand the reasoning for this to ensure there is no drift when exporting and importing, this does
cause problems propagating changes through different superset instances. It also causes problems in multi-tenant
environments where we want to maintain different update policies for charts/dashboard to datasets/databases.
An alternative that might seem possible is to introduce a new parameter to the import process similar to overwrite - for arguments sake, lets call it
sparse
. If this is set to true, if it cannot find the dependency uuid referenced in the zip bundle, it will look it up and use it from the running database.Screenshots/recordings
No response
Superset version
master / latest-dev
Python version
3.9
Node version
16
Browser
Chrome
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: