Dashboard import/export failing
Make sure these boxes are checked before submitting your issue - thank you!
- [X] I have checked the superset logs for python stacktraces and included it here as text if 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
Superset version
superset==0.18.4
Expected results
Import dashboard from on instance to another
Actual results
Fails on import
Steps to reproduce
This is the error:
Sorry, something went wrong 500 - Internal Server Error Stacktrace
Traceback (most recent call last):
File "/opt/superset/env/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app response = self.full_dispatch_request() File "/opt/superset/env/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request rv = self.handle_user_exception(e) File "/opt/superset/env/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception reraise(exc_type, exc_value, tb) File "/opt/superset/env/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request rv = self.dispatch_request() File "/opt/superset/env/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request return self.view_functionsrule.endpoint File "/opt/superset/env/lib/python2.7/site-packages/superset/models/core.py", line 756, in wrapper value = f(*args, **kwargs) File "/opt/superset/env/lib/python2.7/site-packages/superset/views/core.py", line 980, in import_dashboards ds_class.import_obj(table, import_time=current_tt) File "/opt/superset/env/lib/python2.7/site-packages/superset/connectors/sqla/models.py", line 696, in import_obj import_time) File "/opt/superset/env/lib/python2.7/site-packages/superset/import_util.py", line 22, in import_datasource i_datasource.database_id = lookup_database(i_datasource).id File "/opt/superset/env/lib/python2.7/site-packages/superset/connectors/sqla/models.py", line 693, in lookup_database database_name=table.params_dict['database_name']).one() File "/opt/superset/env/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2820, in one raise orm_exc.NoResultFound("No row was found for one()") NoResultFound: No row was found for one()
Looks like you don't have the same datasource available where you are importing it
That would explain it. I guess I was under the assumption it would import / export the dependencies. So I guess that opens a whole other topic. How are people supporting the SDLC process? We have a Dev instance where we work on new slices and dashboards and need to push them to an instance where business users are adding their own. I could just copy the database, but that would overwrite the BU content. Can't do a simple insert sense the keys will be different form on instance to another. Any ideas?
What's SDLC? Also why should you copy the database? You only need to have a datasource with the same name.
Software Development Life Cycle. As is promoting from dev to test, etc. I need to be able to version my slices and dashboard and promote them to Test then Prod
I am also facing the same situation. I have designed some dashboards in development machine (Ex: System1). I want to import the same dashboards in Client machine (Ex: System2).
Are the users should be same on both the machines? If it is datasource problem, I have created the same datasource as per the System1. Still the problem is there
Will you please suggest me how to use export and import functionality across the Machines?
Thanks in Advance
Error handling is not great on the export/import and the whole process is pretty brittle (it was developed by a committer who has since moved on from the project).
But it looks like it's failing because you don't have a database with the same name on the import side. If you create the same database it may succeed.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.
We had this very issue a couple of weeks ago. It is most probably happens when the data source name in the original is different to that in the new one. Try it out and let me know. Happy to help.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.