Databases export/import yaml file bug
See original GitHub issueSuperset bug in exporting datasources from the web application, the errors it produces while importing and a simple workaround to whoever needs it.
Exporting the databases list from http://localhost:8088/databaseview/list/ will result in a missing leading key of the databases in the .yaml file.
To reproduce error
- Go to http://localhost:8088/databaseview/list/ The exported .yaml file from selecting all databases from the list will look like this
- database_name: main
sqlalchemy_uri: postgresql://superset:XXXXXXXXXX@postgres:5432/superset
tables: []
- database_name: examples
sqlalchemy_uri: postgresql://superset:XXXXXXXXXX@postgres:5432/superset
tables: []
- Import datasources to superset (from the docker container or your environment)
superset import_datasources -p <filename>.yaml
result:
2019-10-25 19:54:52,264:INFO:root:Supplied object is not a dictionary.
Reasons
-
The datasources are not imported correctly
-
The reason is simply because of the leading key in the .yaml file is missing.
-
A bug while generating the .yaml file
Simple fix
- Editing .yaml file manually after exporting from the first picture attached
databases:
- database_name: main
sqlalchemy_uri: postgresql://superset:XXXXXXXXXX@postgres:5432/superset
tables: []
- database_name: examples
sqlalchemy_uri: postgresql://superset:XXXXXXXXXX@postgres:5432/superset
tables: []
- Use the export command from terminal, which generates a correct .yaml file
superset export_datasources -p <filename>.yaml
This exports the .yaml correctly with the leading databases key
Environment
Using docker image in the development mode. superset: 0.34.0 python: 3.6 docker: 19.03.4, build 9013bf5
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Databases export/import yaml file bug · Issue #8453 - GitHub
Superset bug in exporting datasources from the web application, the errors it produces while importing and a simple workaround to whoever needs ...
Read more >Cannot export/import or copy APEX application — oracle-tech
I have now solved this problem by looking at the result of importing the exported file with SQKL developer. The problem ocurred when...
Read more >XML Backups and Space Export/Import Troubleshooting
The one operation for which an XML backup is required is database migration. ... or enable debug logging on a space export/import, you...
Read more >Content Export YAML | Drupal.org
For import : if Entity ID is exist in Database , it will be replace . The export process is not export the...
Read more >FIX: Errors when you use export/import data wizard to move ...
Fixes an issue in which errors occur when you move data in SSMS by using export/import data wizard with option "Write a query...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @ibrahimroshdy this is fixed on master now.
Hi @ibrahimroshdy, @villebro,
I’ll submit a PR to fix this