[cli] Fix, import datasources exported by UI#8477
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8477 +/- ##
==========================================
+ Coverage 66.52% 66.79% +0.27%
==========================================
Files 449 449
Lines 22595 22701 +106
Branches 2367 2366 -1
==========================================
+ Hits 15032 15164 +132
+ Misses 7425 7399 -26
Partials 138 138
Continue to review full report at Codecov.
|
|
I think this should be fixed in the UI export, as currently the UI and CLI are generating different yamls. |
Right, but
It's also a decision between: all UI yaml, export the same data structure or database yaml export and cli export/import use same data structure |
|
I'm ok with this as a temporary solution if others are ok with it. Perhaps add the infamous |
villebro
left a comment
There was a problem hiding this comment.
Small nit, other than that LGTM
superset/views/base.py
Outdated
| class YamlExportMixin(object): | ||
| yaml_dict_key: Optional[str] = None | ||
| """ | ||
| Override this if you a dict response instead, with a certain key. |
There was a problem hiding this comment.
nit: ..if you want a dict response..
* [cli] Fix, import datasources exported by UI
* [cli] Fix, import datasources exported by UI
* [cli] Fix, import datasources exported by UI
CATEGORY
SUMMARY
Databases/Datasources export on the UI can't be imported by
superset import_datasourcecli.This fix makes UI yaml export for SQLAlchemy datasources and Druid compatible with the cli.
ADDITIONAL INFORMATION
REVIEWERS
@villebro