You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "carusooo (via GitHub)" <gi...@apache.org> on 2023/02/16 01:34:16 UTC

[GitHub] [superset] carusooo commented on issue #17049: Import of datasources (`superset import-datasources`) fails

carusooo commented on issue #17049:
URL: https://github.com/apache/superset/issues/17049#issuecomment-1432335933

   Yes, I am able to repro this in `2.0.1`.
   
   Importing via the command line
   
   ```
   superset import_datasources -p datasource.zip
   ```
   
   Fails with:
   ```
   Command failed validation
   2023-02-16 01:21:29,301:INFO:superset.datasets.commands.importers.dispatcher:Command failed validation
   There was an error when importing the dataset(s), please check the exception traceback in the log
   Traceback (most recent call last):
     File "/app/superset/cli/importexport.py", line 193, in import_datasources
       ImportDatasetsCommand(contents, overwrite=True).run()
     File "/app/superset/datasets/commands/importers/dispatcher.py", line 64, in run
       raise exc
     File "/app/superset/datasets/commands/importers/dispatcher.py", line 57, in run
       command.run()
     File "/app/superset/commands/importers/v1/__init__.py", line 64, in run
       self.validate()
     File "/app/superset/commands/importers/v1/__init__.py", line 95, in validate
       raise exception
   superset.commands.exceptions.CommandInvalidError: Error importing dataset
   2023-02-16 01:21:29,301:ERROR:superset.cli.importexport:There was an error when importing the dataset(s), please check the exception traceback in the log
   Traceback (most recent call last):
     File "/app/superset/cli/importexport.py", line 193, in import_datasources
       ImportDatasetsCommand(contents, overwrite=True).run()
     File "/app/superset/datasets/commands/importers/dispatcher.py", line 64, in run
       raise exc
     File "/app/superset/datasets/commands/importers/dispatcher.py", line 57, in run
       command.run()
     File "/app/superset/commands/importers/v1/__init__.py", line 64, in run
       self.validate()
     File "/app/superset/commands/importers/v1/__init__.py", line 95, in validate
       raise exception
   superset.commands.exceptions.CommandInvalidError: Error importing dataset
   ```
   
   It's also unclear because [the documentation] mentions that YAML files are supported for import but the output of `superset import_datasources --help` shows that only ZIP is supported:
   ```
   Usage: superset import-datasources [OPTIONS]
   
     Import datasources from ZIP file
   
   Options:
     -p, --path TEXT  Path to a single ZIP file
     --help           Show this message and exit.
     ```


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