You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/01/13 13:51:47 UTC

[GitHub] [superset] cccs-Dustin opened a new issue #18029: The "-s"/"--sync" flags for the Superset import-datasources cli command do not function properly

cccs-Dustin opened a new issue #18029:
URL: https://github.com/apache/superset/issues/18029


   When using the Superset cli, the `import-datasources` command using the "-s"/"--sync" flag does not work as intended. It seems as though the command runs as if the flag is not present.
   
   #### How to reproduce the bug
   
   1) Add an existing yaml file to superset by using the Superset cli
   `superset import-datasources -p ~/datasets/data.yaml`
   2) Once the yaml file has been added, try using the command again but with the "-s"/"--sync" flag (imitating what it would be like if you modified a column name or metric in the YAML file and wanted it to be mirrored in the Superset Dataset)
   `superset import-datasources -s "metrics,columns" -p ~/datasets/data.yaml`
   3) You will notice that the "-s"/"--sync" flag does not work as intended, instead of replacing the existing dataset with the new changes, it unions it with any new metrics and/or columns (the way the "import-datasources" works without the "s"/"--sync" flag)
   
   
   ### Expected results
   
   When the "-s"/"--sync" flag is used with the Superset `import-datasources` cli command, it should delete metrics and/or columns in the DB that are not specified in the YAML file.
   
   ### Actual results
   
   Currently when using the "-s"/"--sync" flag is used with the Superset `import-datasources` cli command, it runs the command as if the "-s"/"--sync" flag is not present (i.e., it unions the columns/metrics together).
   
   
   ### Environment
   
   - operating system name and version: Ubuntu 20.04
   - browser type and version: Google Chrome (Version 97.0.4692.71)
   - superset version: Superset 1.4
   - python version: Python 3.8.12
   - node.js version: Node v14.16.1
   - any feature flags active: N/A
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't found one similar.
   
   ### Additional context
   
   Also, I see where in code that this issue can be resolved, I can create a Pull Request to fix it:
   /superset/superset/cli.py (line 573)
   /superset/superset/datasets/commands/importers/v0.py (line 287)
   


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


[GitHub] [superset] geido closed issue #18029: The "-s"/"--sync" flags for the Superset import-datasources cli command do not function properly

Posted by GitBox <gi...@apache.org>.
geido closed issue #18029:
URL: https://github.com/apache/superset/issues/18029


   


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


[GitHub] [superset] geido commented on issue #18029: The "-s"/"--sync" flags for the Superset import-datasources cli command do not function properly

Posted by GitBox <gi...@apache.org>.
geido commented on issue #18029:
URL: https://github.com/apache/superset/issues/18029#issuecomment-1012295270


   > Also, I see where in code that this issue can be resolved, I can create a Pull Request to fix it:
   
   @cccs-Dustin this would be beyond amazing! I am happy to help. Just ping me on the [Superset Slack](https://join.slack.com/t/apache-superset/shared_invite/zt-uxbh5g36-AISUtHbzOXcu0BIj7kgUaw)


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


[GitHub] [superset] geido closed issue #18029: The "-s"/"--sync" flags for the Superset import-datasources cli command do not function properly

Posted by GitBox <gi...@apache.org>.
geido closed issue #18029:
URL: https://github.com/apache/superset/issues/18029


   


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