withnale opened a new issue, #32972:
URL: https://github.com/apache/superset/issues/32972
### Bug description
The export format that superset generates should be as clean as possible to
make it easy to take an export and use it in multiple scenarios. At present
certain fields are present in the format that are completely unnecessary and
are immediately thrown away on import. Most of these anomalies are based on the
fact that internally primary keys are used whereas the export wires things
together using UUIDs.
This can be seen most obviously if you take an assets export from one
environment, import it into another environment and then export it again. Since
none of the dashboards or dependencies have changed this should be an operation
that is neutral and both exports should be exactly the same. However this is
not the case.
If you examine `ImportAssetsCommand` or any of the model specific
alternatives you can see in numerous occasions where such fields are not read
but immediately overwritten. If that is the case these should be stripped out
of the export.
In looking at `superset/commands/dashboard/importers/v1/__init__.py` some
examples of these keys in the export format that are irrelevant/ignored are:
- Datasets
- `database_id`
- Charts
- `datasource`
- `datasource_id`
- `datasource_type`
- `datasource_name`
- `query_context`
- `dashboards`
- Dashboards
- `$.position.*.chartId`
This will not be exhaustive - I'm sure there are some more but these would
be a start. The removal of all of the above would make the exports more
semantic and less instance specific.
I would be happy to provide a PR to make the above happen.
### Screenshots/recordings
_No response_
### Superset version
master / latest-dev
### Python version
3.9
### Node version
16
### Browser
Chrome
### Additional context
_No response_
### Checklist
- [ ] I have searched Superset docs and Slack and didn't find a solution to
my problem.
- [ ] I have searched the GitHub issue tracker and didn't find a similar bug
report.
- [ ] 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]