You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by sf...@apache.org on 2024/03/05 16:13:35 UTC

(superset) branch master updated: docs(import_datasources): Remove legacy documentation and update current use (#27290)

This is an automated email from the ASF dual-hosted git repository.

sfirke pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 721977a474 docs(import_datasources): Remove legacy documentation and update current use (#27290)
721977a474 is described below

commit 721977a4745e8b6aa5d8e6d1b898069764cc11a6
Author: James O'Claire <ja...@gmail.com>
AuthorDate: Tue Mar 5 08:13:28 2024 -0800

    docs(import_datasources): Remove legacy documentation and update current use (#27290)
    
    Co-authored-by: Sam Firke <sf...@users.noreply.github.com>
---
 .../importing-exporting-datasources.mdx            | 30 +++++++++++++++++++---
 1 file changed, 27 insertions(+), 3 deletions(-)

diff --git a/docs/docs/miscellaneous/importing-exporting-datasources.mdx b/docs/docs/miscellaneous/importing-exporting-datasources.mdx
index e51aed3536..11d2ff6faf 100644
--- a/docs/docs/miscellaneous/importing-exporting-datasources.mdx
+++ b/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 of legacy import without options:
+
+```
+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, 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:
 
 ```
 superset import_datasources -p <path or filename>
 ```
 
-If you supply a path all files ending with **yaml** or **yml** will be parsed. You can apply
+When `VERSIONED_EXPORT` is `False`, if you supply a path all files ending with **yaml** or **yml** will be parsed. You can apply
 additional flags (e.g. to search the supplied path recursively):
 
 ```