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/05/12 02:53:42 UTC

[GitHub] [superset] srinisubramanian opened a new issue, #20037: Export/Import does not import certification details and Chart changes

srinisubramanian opened a new issue, #20037:
URL: https://github.com/apache/superset/issues/20037

   Exporting a dashboard and importing it into another instance/landscape of Superset (where the dashboard was previously imported and created) prompts to overwrite and on confirmation imports.  The dashboard changes (title etc) are imported but the certification data entered for a dashboard is not imported.  Also any chart changes are not imported.
   
   #### How to reproduce the bug
   
   1.  Create a dashboard and add a chart.  Export and Import it to another instance where the dashboard does not exist.  Import is successful but the Dashboard Certification and Certified By details are not imported.
   2. Now make some change in the Dashboard like changing title and also changes in the include chart in the original instance like changing title or making changes to the chart itself.  Export the dashboard and import it to the second system.  The dashboard changes are imported but the Chart changes are NOT imported.
   3. For testing I exported only the chart and imported the chart and it works.  Looks like the overwrite of dashboard works but overwrite of chart is missing.
   
   ### Expected results
   Chart changes are also imported
   
   ### Actual results
   Chart changes are NOT imported
   
   #### Screenshots
   
   If applicable, add screenshots to help explain your problem.
   
   
   ### Environment
   
   (please complete the following information):
   
   - browser type and version: Chrome latest
   - superset version: 1.5.0
   - python version: 3.8.12
   - node.js version: N/A
   - any feature flags active: DASHBOARD_RBAC, VERSIONED_EXPORT, ENABLE_TEMPLATE_PROCESSING and DASHBOARD_CROSS_FILTERS
   
   ### 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
   
   Add any other context about the problem here.
   


-- 
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.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] betodealmeida commented on issue #20037: Export/Import does not import certification details and Chart changes

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

   @srinisubramanian there's another option: https://github.com/apache/superset/blob/master/superset/importexport/api.py#L93
   
   If you `POST` the ZIP file to `/api/v1/assets/import` then everything will be overwritten.


-- 
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] srinisubramanian commented on issue #20037: Export/Import does not import certification details and Chart changes

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

   @betodealmeida @EBoisseauSierra  Any assistance on this greatly appreciated


-- 
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] srinisubramanian commented on issue #20037: Export/Import does not import certification details and Chart changes

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

   Thanks @betodealmeida let me try that. 


-- 
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] srinisubramanian commented on issue #20037: Export/Import does not import certification details and Chart changes

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

   @villebro The previous export/import issues I had reported all seem to be addressed with the 1.5.0 build but the overwrite of Chart is still not working.


-- 
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] betodealmeida commented on issue #20037: Export/Import does not import certification details and Chart changes

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

   @srinisubramanian it's by design that chart changes are not imported — there could be other dashboards using that chart, and we don't want to break them.
   
   In the current workflow the overwrite affects only the imported asset, not the related ones. The behavior is identical if you import an existing chart with a modified dataset, for example. I know someone from Nielsen (@[ofekisr](https://github.com/ofekisr) maybe?) was working on a PR where you can choose what you want to overwrite, but I'm not sure of its status.
   
   The missing certification data, OTOH, is a bug, we should fix that.


-- 
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] DharmenderKaushik commented on issue #20037: Export/Import does not import certification details and Chart changes

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

   @srinisubramanian can you please tell how you solved this issue


-- 
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] zorroli93 commented on issue #20037: Export/Import does not import certification details and Chart changes

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

   but I even can't get zip files imported where it's saying "An error occurred while importing chart: Import chart failed for an unknown reason Please re-export your file and try importing again
   
   Database driver for importing maybe not installed. Visit the Superset documentation page for installation instructions:[here](https://superset.apache.org/docs/databases/installing-database-drivers)." 
   
   So what do I should do to resolve this problem, thank you.


-- 
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] srinisubramanian commented on issue #20037: Export/Import does not import certification details and Chart changes

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

   @betodealmeida One question.  The file is being exported using dashboard/export since I wanted to export only 1 dashboard (and assets/export seems to export all with no filter), I extracted the zip file, modified metadata.yaml and changed type to assets (it was Dashboard).  The modified zip file was imported successfully with assets/import.  
   
   Q1.  is it ok to import the dashboard export as assets export as I see no change in the files after comparison
   Q2.  Is there a way to only assets/export selected dashboards?


-- 
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] srinisubramanian commented on issue #20037: Export/Import does not import certification details and Chart changes

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

   Please see previous comment. I started using individual import and export APIs to import each entity separately 


-- 
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] SharonCastel commented on issue #20037: Export/Import does not import certification details and Chart changes

Posted by "SharonCastel (via GitHub)" <gi...@apache.org>.
SharonCastel commented on issue #20037:
URL: https://github.com/apache/superset/issues/20037#issuecomment-1403250395

   is this issue was fixed? I'm strangling with the same nightmare here... @srinisubramanian @DharmenderKaushik 
   When changing dataset of a chart the import fails even with overwrite option


-- 
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] srinisubramanian commented on issue #20037: Export/Import does not import certification details and Chart changes

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

   @betodealmeida  I did try this today.  I exported the dashboard using the dashboard export API (not the assets/export) and imported using the assets/import API.  All I get is a cryptic error:
   
   2022-06-03 09:52:23,500:INFO:werkzeug - - [03/Jun/2022 09:52:23] "POST /api/v1/assets/import HTTP/1.0" 308 -
   Error importing assets
   2022-06-03 09:52:24,237:WARNING:superset.views.base:Error importing assets
   
   Can I import dashboards in this way or it needs to be exported via the assets/export API?  Issue is I dont want to export all dashboards but only selected dashboard.


-- 
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] srinisubramanian commented on issue #20037: Export/Import does not import certification details and Chart changes

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

   I decided to use the export and import APIs of each entity ie. Dashboard, Database, Dataset and Chart. This works with overwrite option too. 


-- 
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] unnyns-307 commented on issue #20037: Export/Import does not import certification details and Chart changes

Posted by "unnyns-307 (via GitHub)" <gi...@apache.org>.
unnyns-307 commented on issue #20037:
URL: https://github.com/apache/superset/issues/20037#issuecomment-1630738424

   Hello all @betodealmeida @SharonCastel @srinisubramanian , I opened SIP for purposing importing-item's ability to overwrite cascading items inside here #24660 I hope we could discuss further or sharing if there is any concerns for developing this ability.


-- 
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] srinisubramanian commented on issue #20037: Export/Import does not import certification details and Chart changes

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

   @betodealmeida Got the chance to finally upgrade to 2.0.  The **assets/import** end point still fails with the following exception:
   
   ```
   CommandException
   Traceback (most recent call last):
     File "/home/xxxxx/.pyenv/versions/3.8.12/envs/superset/lib/python3.8/site-packages/flask/app.py", line 1517, in full_dispatch_request
       rv = self.dispatch_request()
     File "/home/xxxxx/.pyenv/versions/3.8.12/envs/superset/lib/python3.8/site-packages/flask/app.py", line 1503, in dispatch_request
       return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
     File "/home/xxxxx/.pyenv/versions/3.8.12/envs/superset/lib/python3.8/site-packages/flask_appbuilder/security/decorators.py", line 98, in wraps
       return f(self, *args, **kwargs)
     File "/home/xxxxx/.pyenv/versions/3.8.12/envs/superset/lib/python3.8/site-packages/superset/utils/log.py", line 245, in wrapper
       value = f(*args, **kwargs)
     File "/home/xxxxx/.pyenv/versions/3.8.12/envs/superset/lib/python3.8/site-packages/superset/views/base_api.py", line 98, in wraps
       return f(self, *args, **kwargs)
     File "/home/xxxxx/.pyenv/versions/3.8.12/envs/superset/lib/python3.8/site-packages/superset/importexport/api.py", line 161, in import_
       command.run()
     File "/home/xxxxx/.pyenv/versions/3.8.12/envs/superset/lib/python3.8/site-packages/superset/commands/importers/v1/assets.py", line 136, in run
       self.validate()
     File "/home/xxxxx/.pyenv/versions/3.8.12/envs/superset/lib/python3.8/site-packages/superset/commands/importers/v1/assets.py", line 164, in validate
       raise exception
   superset.commands.exceptions.CommandInvalidError: Error importing assets
   ```
   
   This happens for both a new dashboard and an existing dashboard.  However the **dashboard/import** endpoint works for a new dashboard.  And as you had explained existing dashboards new charts are imported but changes to old ones are not overwritten.
   
   Any thoughts on how to get the assets/import to work for a single dashboard


-- 
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] srinisubramanian closed issue #20037: Export/Import does not import certification details and Chart changes

Posted by GitBox <gi...@apache.org>.
srinisubramanian closed issue #20037: Export/Import does not import certification details and  Chart changes
URL: https://github.com/apache/superset/issues/20037


-- 
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] SharonCastel commented on issue #20037: Export/Import does not import certification details and Chart changes

Posted by "SharonCastel (via GitHub)" <gi...@apache.org>.
SharonCastel commented on issue #20037:
URL: https://github.com/apache/superset/issues/20037#issuecomment-1403261507

   oh, @srinisubramanian thanks for the immediate answer!  
   if I would like to copy the environment with export-assets every time to another environment (from dev to stagging or prod) and the change that I did is to change the chart's dataset (not a change in the dataset itself but assigning another dataset to exists chart)


-- 
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] srinisubramanian commented on issue #20037: Export/Import does not import certification details and Chart changes

Posted by "srinisubramanian (via GitHub)" <gi...@apache.org>.
srinisubramanian commented on issue #20037:
URL: https://github.com/apache/superset/issues/20037#issuecomment-1403282378

   I had the exact same requirement. If you search for issues related to this one of them had a suggested answer. I can't recall it exactly 


-- 
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] SharonCastel commented on issue #20037: Export/Import does not import certification details and Chart changes

Posted by "SharonCastel (via GitHub)" <gi...@apache.org>.
SharonCastel commented on issue #20037:
URL: https://github.com/apache/superset/issues/20037#issuecomment-1403486156

   I tried it, unfortunately it didn't solve the problem.


-- 
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] srinisubramanian commented on issue #20037: Export/Import does not import certification details and Chart changes

Posted by "srinisubramanian (via GitHub)" <gi...@apache.org>.
srinisubramanian commented on issue #20037:
URL: https://github.com/apache/superset/issues/20037#issuecomment-1403257039

   It was confirmed that overwrite works only for that entity. While importing dashboard it will only overwrite the dashboard. This is by design. If you want to overwrite dataset you need to import dataset with overwrite 


-- 
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] srinisubramanian commented on issue #20037: Export/Import does not import certification details and Chart changes

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

   Possible issue; I traced this to superset/charts/commands/importers/v1/utils.py. Although the API call is made with overwtite=True, the call always receives False. Setting it as True in the function correctly imports and overwrites the charts.
   
   Tracing back further to the file: superset/dashboards/commands/importers/v1/utils.py
   
   All calls the _import() call receives the right flag from the API. However all the calls to import_database(), import_dataset() and import_chart() have overwrite hardcoded to False. Only the call to import_dashboard() passes in the flag as input in the 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


[GitHub] [superset] srinisubramanian commented on issue #20037: Export/Import does not import certification details and Chart changes

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

   @betodealmeida Thanks for the clarification. So to get the whole dashboard imported from one system to another (we need to do it programmatically) is there any workaround other than hacking the code? The obvious alternative seems to be to loop through and also import chart using the 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