fabianmenges opened a new pull request #3978: Adding YAML Import/Export for Datasources to CLI URL: https://github.com/apache/incubator-superset/pull/3978 Context: https://groups.google.com/forum/#!topic/airbnb_superset/GeWZs42_NyA # Summary Adding YAML import and export for datasources, which includes (SqlAlchemy) Databases and Druid Clusters to the Superset CLI. ## Description I added the core of the Import/Export logic to the `ImportMixin` mix-in class. It heavily relies on SqlAlchemy to determine the schema of the YAML and the relationship of objects. Specifically it uses unique constraints to identify and update existing elements. This required me to add unique constraints to existing tables, but I'm pretty confident that this should not cause major issues with existing installations since I added them in the "spirit" of the current design. In addition to the SqlAlchemy relationships the main object hierarchy needs to be defined by configuring the `export_parent` and `export_children` attributes appropriately (documented in code). The unit test covers only basic importing exporting (it was liftet from the existing pickle import/export) and should probably be extended to cover more edge cases. You can export databases, druid clusters, tables, datasources from the UI: <img width="970" alt="screen shot 2017-11-16 at 6 52 46 pm" src="https://user-images.githubusercontent.com/3138343/32922299-80e47738-caff-11e7-850d-78c5d43b4720.png"> ## Possible Future Projects/Improvements - Add YAML import/export for Slices and Dashboards. - Adding support to import/export individual database / tables / metrics, etc. as root element of a YAML file. - Support of importing multiple YAML files at the same time - Support to split exports into smaller files - It would also be nice to use the YAML import for the example datasets. - Adding YAML import to the Web UI and/or API Re-created #2993 This PR was getting too old for travis.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
