You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "sfirke (via GitHub)" <gi...@apache.org> on 2024/03/04 19:48:53 UTC
Re: [PR] docs(import_datasources): Remove legacy documentation and update current use [superset]
sfirke commented on code in PR #27290:
URL: https://github.com/apache/superset/pull/27290#discussion_r1511711533
##########
docs/docs/miscellaneous/importing-exporting-datasources.mdx:
##########
@@ -61,15 +61,39 @@ superset export_datasource_schema
As a reminder, you can use the `-b` flag to include back references.
-### Importing Datasources from YAML
+### Importing Datasources
-In order to import datasources from a YAML file(s), run:
+In order to import datasources from a ZIP file, run:
+
+```
+superset import_datasources -p <path / filename>
+```
+
+The optional username flag **-u** sets the user used for the datasource import. The default is 'admin'. Example:
+
+```
+superset import_datasources -p <path / filename> -u 'admin'
+```
+
+### Legacy Importing Datasources
+
+#### From older versions of Superset to current version
+
+When using Superset version 4.x.x to import from an older version (2.x.x or 3.x.x) importing is supported as the command `legacy_import_datasources` and expects a JSON or directory of JSONs. The options are `-r` for recursive and `-u` for specifying a user. Example:
Review Comment:
You say the options are `-r` and `-u` but then the example has `-p` -- is that correct? Just checking that `-p` is supported here and that you don't want to demo `-r` or `-u` in the command.
##########
docs/docs/miscellaneous/importing-exporting-datasources.mdx:
##########
@@ -61,15 +61,39 @@ superset export_datasource_schema
As a reminder, you can use the `-b` flag to include back references.
-### Importing Datasources from YAML
+### Importing Datasources
-In order to import datasources from a YAML file(s), run:
+In order to import datasources from a ZIP file, run:
+
+```
+superset import_datasources -p <path / filename>
+```
+
+The optional username flag **-u** sets the user used for the datasource import. The default is 'admin'. Example:
+
+```
+superset import_datasources -p <path / filename> -u 'admin'
+```
+
+### Legacy Importing Datasources
+
+#### From older versions of Superset to current version
+
+When using Superset version 4.x.x to import from an older version (2.x.x or 3.x.x) importing is supported as the command `legacy_import_datasources` and expects a JSON or directory of JSONs. The options are `-r` for recursive and `-u` for specifying a user. Example:
+
+```
+superset legacy_import_datasources -p <path or filename>
+```
+
+#### From older versions of Superset to older versions
+
+When using an older Superset version (2.x.x & 3.x.x) of Superset, ZIP and YAML files are supported, and to switch between them the feature flag `VERSIONED_EXPORT` is used. When `VERSIONED_EXPORT` is `True`, `import_datasources` expects a ZIP file, otherwise YAML. Example:
Review Comment:
```suggestion
When using an older Superset version (2.x.x & 3.x.x) of Superset, the command is `import_datasources`. ZIP and YAML files are supported and to switch between them the feature flag `VERSIONED_EXPORT` is used. When `VERSIONED_EXPORT` is `True`, `import_datasources` expects a ZIP file, otherwise YAML. Example:
```
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org