Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(import_datasources): Remove legacy documentation and update current use #27290

Merged
merged 8 commits into from
Mar 5, 2024
20 changes: 17 additions & 3 deletions docs/docs/miscellaneous/importing-exporting-datasources.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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:
ddxv marked this conversation as resolved.
Show resolved Hide resolved

```
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):

```
Expand Down
Loading