You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "ruifpedro (via GitHub)" <gi...@apache.org> on 2024/02/06 11:31:50 UTC
[I] Error importing dashboard [superset]
ruifpedro opened a new issue, #27027:
URL: https://github.com/apache/superset/issues/27027
### Bug description
Hey Superset team!
Since I've upgraded from Superset v3.0.0 to v3.1.0, I have stopped being able to successfully import dashboards that contain datasets that specifically use a Trino datasource, with the new feature of `Enable row expansion in schemas` enabled.
Additionally figured out that if I modify the respective database yaml that is shipped out in the zip export, and manually remove the `extra.schema_options.expand_rows` key and value, importing works. This mitigates the problem for the time being, but does not solve it.
The source of the problem seems to lie in the Superset importing tool not take into account this new Trino feature.
I will provide evidence and more context below.
Looking forward your response and happy to clarify any more details.
### How to reproduce the bug
1. Go to Dashboards
2. Bulk select dashboards that contain charts that use a Trino database with `Enable row expansion in schemas` enabled
3. Export dashboards
4. Import dashboards
### Screenshots/recordings
Superset stacktrace:
```
Command failed validation
2024-02-06 10:56:35,825:INFO:superset.commands.dashboard.importers.dispatcher:Command failed validation
CommandException
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/usr/local/lib/python3.9/site-packages/flask_appbuilder/security/decorators.py", line 95, in wraps
return f(self, *args, **kwargs)
File "/app/superset/views/base_api.py", line 127, in wraps
raise ex
File "/app/superset/views/base_api.py", line 121, in wraps
duration, response = time_function(f, self, *args, **kwargs)
File "/app/superset/utils/core.py", line 1454, in time_function
response = func(*args, **kwargs)
File "/app/superset/utils/log.py", line 255, in wrapper
value = f(*args, **kwargs)
File "/app/superset/views/base_api.py", line 108, in wraps
return f(self, *args, **kwargs)
File "/app/superset/dashboards/api.py", line 1193, in import_
command.run()
File "/app/superset/commands/dashboard/importers/dispatcher.py", line 64, in run
raise exc
File "/app/superset/commands/dashboard/importers/dispatcher.py", line 57, in run
command.run()
File "/app/superset/commands/importers/v1/__init__.py", line 73, in run
self.validate()
File "/app/superset/commands/importers/v1/__init__.py", line 111, in validate
raise CommandInvalidError(
superset.commands.exceptions.CommandInvalidError: Error importing dashboard
2024-02-06 10:56:35,826:WARNING:superset.views.base:CommandException
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/usr/local/lib/python3.9/site-packages/flask_appbuilder/security/decorators.py", line 95, in wraps
return f(self, *args, **kwargs)
File "/app/superset/views/base_api.py", line 127, in wraps
raise ex
File "/app/superset/views/base_api.py", line 121, in wraps
duration, response = time_function(f, self, *args, **kwargs)
File "/app/superset/utils/core.py", line 1454, in time_function
response = func(*args, **kwargs)
File "/app/superset/utils/log.py", line 255, in wrapper
value = f(*args, **kwargs)
File "/app/superset/views/base_api.py", line 108, in wraps
return f(self, *args, **kwargs)
File "/app/superset/dashboards/api.py", line 1193, in import_
command.run()
File "/app/superset/commands/dashboard/importers/dispatcher.py", line 64, in run
raise exc
File "/app/superset/commands/dashboard/importers/dispatcher.py", line 57, in run
command.run()
File "/app/superset/commands/importers/v1/__init__.py", line 73, in run
self.validate()
File "/app/superset/commands/importers/v1/__init__.py", line 111, in validate
raise CommandInvalidError(
superset.commands.exceptions.CommandInvalidError: Error importing dashboard
```
# Screenshots
Superset error

Browser debug

Trino Database connection

Trino Database exported YAML

### Superset version
3.1.0
### Python version
3.9
### Node version
Not applicable
### Browser
Firefox
### Additional context
I have the following feature flags enabled:
```
FEATURE_FLAGS = {
"ALERT_REPORTS": True,
"DASHBOARD_RBAC": True,
"ENABLE_TEMPLATE_PROCESSING": True,
}
```
There are no customization made on Superset, but the container image is packaged by me in order to include necessary dependencies like the Trino connector.
The Superset is deployed in Kubernetes using the official Superset helm chart.
About the data source I am querying, I've already provided details on it on the post.
### Checklist
- [X] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [X] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [X] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
--
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
Re: [I] Error importing dashboard [superset]
Posted by "qleroy (via GitHub)" <gi...@apache.org>.
qleroy commented on issue #27027:
URL: https://github.com/apache/superset/issues/27027#issuecomment-2893192688
This is a fix https://github.com/apache/superset/pull/32657 ?
--
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
Re: [I] Error importing dashboard [superset]
Posted by "lokeshwar9 (via GitHub)" <gi...@apache.org>.
lokeshwar9 commented on issue #27027:
URL: https://github.com/apache/superset/issues/27027#issuecomment-1982626266
Hello @ruifpedro , Your detailed explanation helped us figure out that checking the "enable row expansion" is causing the dashboard import error in the same instance and different instance, we fixed it by writing code to stop schema options keys from going into the export zip.
we noticed that we are unable to uncheck the "enable row expansion" using GUI and we used curl to uncheck it.
Many Thanks once again and hope this helps others as well.
Good day
--
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
Re: [I] Error importing dashboard [superset]
Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on issue #27027:
URL: https://github.com/apache/superset/issues/27027#issuecomment-1969292480
Nice issue description @ruifpedro! Thank you.
I'll tag some folks with knowledge about that feature: @betodealmeida @eschutho @rusackas
--
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
Re: [I] Error importing dashboard [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #27027:
URL: https://github.com/apache/superset/issues/27027#issuecomment-2960558120
Can anyone cofirm or deny if https://github.com/apache/superset/pull/32657 resolved this?
--
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
Re: [I] Error importing dashboard [superset]
Posted by "amirhosseinkabiri (via GitHub)" <gi...@apache.org>.
amirhosseinkabiri commented on issue #27027:
URL: https://github.com/apache/superset/issues/27027#issuecomment-3170598745
read this article. it may help
https://medium.com/@amirhosseikabiri/solving-the-superset-import-export-issue-a-step-by-step-guide-35f16451b196
--
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
Re: [I] Error importing dashboard [superset]
Posted by "marituhone (via GitHub)" <gi...@apache.org>.
marituhone commented on issue #27027:
URL: https://github.com/apache/superset/issues/27027#issuecomment-2076518381
@ruifpedro do you manage to solve the issue,i get the same issue how can i fix it?
--
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
Re: [I] Error importing dashboard [superset]
Posted by "ruifpedro (via GitHub)" <gi...@apache.org>.
ruifpedro commented on issue #27027:
URL: https://github.com/apache/superset/issues/27027#issuecomment-2076594724
> Hello @ruifpedro , Your detailed explanation helped us figure out that checking the "enable row expansion" is causing the dashboard import error in the same instance and different instance, we fixed it by writing code to stop schema options keys from going into the export zip. we noticed that we are unable to uncheck the "enable row expansion" using GUI and we used curl to uncheck it. Many Thanks once again and hope this helps others as well. Good day
I've missed your comment! Yes that it's the case, I'm also unable to uncheck the "enable row expansion" 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
Re: [I] Error importing dashboard [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #27027:
URL: https://github.com/apache/superset/issues/27027#issuecomment-2960559951
Or https://github.com/apache/superset/pull/33547 for that matter (you'd have to pull it and test locally)
--
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
Re: [I] Error importing dashboard [superset]
Posted by "ruifpedro (via GitHub)" <gi...@apache.org>.
ruifpedro commented on issue #27027:
URL: https://github.com/apache/superset/issues/27027#issuecomment-2076602114
> @ruifpedro do you manage to solve the issue?i get the same issue how can i fix it?
As my first post states, I've managed to circumvent the problem by simply, exporting the dashboard, opening up the zip and modifying the respective database yaml to manually remove the `extra.schema_options` key and values. Zip the contents and then you have a valid set of assets that can be imported.
--
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
Re: [I] Error importing dashboard [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #27027:
URL: https://github.com/apache/superset/issues/27027#issuecomment-4043667192
PR #32657 ("fix(import): Import a DB connection with expanded rows enabled") was merged on 2025-03-14 and should address this issue — it specifically fixes importing database connections that have the "Enable row expansion in schemas" (Trino `schema_options`) feature enabled. If you're still seeing import failures with Trino datasources on a version that includes that fix, it would be great if you could open a new issue with your Superset version and error details. Closing as fixed — last activity was approximately 7 months ago.
--
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
Re: [I] Error importing dashboard [superset]
Posted by "ilndinesh (via GitHub)" <gi...@apache.org>.
ilndinesh commented on issue #27027:
URL: https://github.com/apache/superset/issues/27027#issuecomment-1980661808
Hello @ruifpedro thank you for detailed explanation. It helped us as well.
--
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
Re: [I] Error importing dashboard [superset]
Posted by "SuDaYu2019 (via GitHub)" <gi...@apache.org>.
SuDaYu2019 commented on issue #27027:
URL: https://github.com/apache/superset/issues/27027#issuecomment-2686791496
我也遇到这个问题(4.1.1)。在数据集设置里,添加过参数模板(jinja)。 导致产生了template_params。 从而影响到了看板和数据库的导入(导出并没有影响)。

--
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
Re: [I] Error importing dashboard [superset]
Posted by "eschutho (via GitHub)" <gi...@apache.org>.
eschutho commented on issue #27027:
URL: https://github.com/apache/superset/issues/27027#issuecomment-2726042622
@geido can we put up a bounty for this?
--
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
Re: [I] Error importing dashboard [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #27027: Error importing dashboard
URL: https://github.com/apache/superset/issues/27027
--
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