You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "ddxv (via GitHub)" <gi...@apache.org> on 2024/02/28 17:57:47 UTC

[PR] docs(import_datasources): Remove legacy documentation and update current use [superset]

ddxv opened a new pull request, #27290:
URL: https://github.com/apache/superset/pull/27290

   ### SUMMARY
   The documentation was still referencing the "legacy_import_datasources". I updated to the current expected use for ZIP files and `--username` option based on #27154.
   
   I have removed the documentation which was for `legacy_import_datasources` based on the assumption that this is not expected to be supported. 
   
   If we would like to keep supporting the `legacy_import_datasources` I can add it back into the docs with it's own titled section. 
   
   Please let me know what works best.
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
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


Re: [PR] docs(import_datasources): Remove legacy documentation and update current use [superset]

Posted by "sfirke (via GitHub)" <gi...@apache.org>.
sfirke commented on PR #27290:
URL: https://github.com/apache/superset/pull/27290#issuecomment-1979134935

   thank you @ddxv for this great update to the docs! 🙌 


-- 
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


Re: [PR] docs(import_datasources): Remove legacy documentation and update current use [superset]

Posted by "sfirke (via GitHub)" <gi...@apache.org>.
sfirke merged PR #27290:
URL: https://github.com/apache/superset/pull/27290


-- 
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


Re: [PR] docs(import_datasources): Remove legacy documentation and update current use [superset]

Posted by "ddxv (via GitHub)" <gi...@apache.org>.
ddxv commented on PR #27290:
URL: https://github.com/apache/superset/pull/27290#issuecomment-1970037951

   @sfirke thanks for the input. I went ahead and undid the deletion of the legacy documentation, and instead labled it as `Legacy Import Datasources`.
   
    I also added clarification for using the `VERSIONED_EXPORT` which was used in an if / else switch in versions 2/3 for accepting either the ZIP file or YAML file(s).


-- 
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


Re: [PR] docs(import_datasources): Remove legacy documentation and update current use [superset]

Posted by "ddxv (via GitHub)" <gi...@apache.org>.
ddxv commented on PR #27290:
URL: https://github.com/apache/superset/pull/27290#issuecomment-1971826380

   > Thanks for the changes. To check my understanding, are there three scenarios to cover:
   > 
   >     1. Importing 4.0.0+ dashboards into a 4.0.0+ instance = use `import_datasources`
   > 
   >     2. Importing <4.0.0 dashboards into a 4.0.0+ instance = use `legacy_import_datasources`
   > 
   >     3. Importing <4.0.0 dashboards into a <4.0.0 instance = use `import_datasources`
   > 
   > 
   > Is that right? Right now 1. is covered, but the legacy piece could be clearer in how it covers both 2 & 3.
   > 
   > Sorry if this feels like I'm belaboring this or if I'm misunderstanding.
   
   Glad you brought that up, I hadn't considered upgrading across versions as I had gotten into this from just deploying a specific versions.  Your 3 points are definitely valid, so I added a couple more sections to the Legacy section to cover them. 


-- 
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


Re: [PR] docs(import_datasources): Remove legacy documentation and update current use [superset]

Posted by "ddxv (via GitHub)" <gi...@apache.org>.
ddxv commented on code in PR #27290:
URL: https://github.com/apache/superset/pull/27290#discussion_r1512094550


##########
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:
   Hello sfirke, the command with -p is correct as that is a required parameter, but it is confusing in this example to have not included either the optionals. I think clarifying this will help.



-- 
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


Re: [PR] docs(import_datasources): Remove legacy documentation and update current use [superset]

Posted by "sfirke (via GitHub)" <gi...@apache.org>.
sfirke commented on PR #27290:
URL: https://github.com/apache/superset/pull/27290#issuecomment-1971753547

   Thanks for the changes.  To check my understanding, are there three scenarios to cover:
   
   1. Importing 4.0.0+ dashboards into a 4.0.0+ instance = use `import_datasources`
   2. Importing <4.0.0 dashboards into a 4.0.0+ instance = use `legacy_import_datasources`
   3. Importing <4.0.0 dashboards into a <4.0.0 instance = use `import_datasources`
   
   Is that right?  Right now 1. is covered, but the legacy piece could be clearer in how it covers both 2 & 3.
   
   Sorry if this feels like I'm belaboring this or if I'm misunderstanding.


-- 
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


Re: [PR] docs(import_datasources): Remove legacy documentation and update current use [superset]

Posted by "sfirke (via GitHub)" <gi...@apache.org>.
sfirke commented on PR #27290:
URL: https://github.com/apache/superset/pull/27290#issuecomment-1969915530

   I'm unfamiliar with the technical aspect of this but appreciate you keeping the docs updated!  My only concern would be if this only applies to the latest version (I see the PR is tagged 4.0 / 3.1) and we would want to keep the older info for users of older versions.   Did this documentation even work before your patch, it sounds like it was broken?  If it worked for a reasonably recent version (say 2.0.0 or later) I'd be inclined to preserve it.
   
   Ideally there'd be a way to link to an older static version of the docs, but I don't think that's possible, so anything useful could be preserved in a section labeled as such.


-- 
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


Re: [PR] docs(import_datasources): Remove legacy documentation and update current use [superset]

Posted by "sfirke (via GitHub)" <gi...@apache.org>.
sfirke commented on code in PR #27290:
URL: https://github.com/apache/superset/pull/27290#discussion_r1508026058


##########
docs/docs/miscellaneous/importing-exporting-datasources.mdx:
##########
@@ -61,15 +61,29 @@ 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 YAML
+
+In Superset 4 the older way of datasource importing is supported as `legacy_import_datasources`. In older versions (2 & 3) of Superset, to switch between ZIP and YAML files, the feature flag `VERSIONED_EXPORT` is used. When `VERSIONED_EXPORT` is `True`, `import_datasources` expects a ZIP file, otherwise YAML. Example:

Review Comment:
   ```suggestion
   In Superset version 4.x.x the older way of datasource importing is supported as the command `legacy_import_datasources`. In older versions (2.x.x & 3.x.x) of Superset, to switch between ZIP and YAML files, 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


Re: [PR] docs(import_datasources): Remove legacy documentation and update current use [superset]

Posted by "sfirke (via GitHub)" <gi...@apache.org>.
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