-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Importing assets not working properly #286
Comments
Hi @Mast3rSensei, Thanks for reporting this issue and for the additional investigation. A potential fix is being discussed on this PR #269 Thank you! |
Thank you @Vitor-Avila, any news about that? It's some time now the PR has been opened and the author disappeared. |
Addressed the issue here #292 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm having problems when trying to import all my assets from an assets/ folder to a Superset app. The error is kinda weird: while importing a given slice, I get a KeyError because the dataset_uuid does not result to be present among the
configs
. However, if I try to manually change the dataset_uuid to the one the error points to be missing, I get the same KeyError, for the same slice, telling me that now is missing fromconfigs
the dataset_uuid that was previously set before I manually changed it.2024-04-19 09:30:59,735:INFO:superset.models.helpers:Importing new slices Owner Revenue over time CommandException Traceback (most recent call last): File "/app/superset/commands/importers/v1/assets.py", line 154, in run self._import(db.session, self._configs) File "/app/superset/commands/importers/v1/assets.py", line 127, in _import config = update_id_refs(config, chart_ids, dataset_info) File "/app/superset/dashboards/commands/importers/v1/utils.py", line 137, in update_id_refs target["datasetId"] = dataset_info[dataset_uuid]["datasource_id"] KeyError: '87c25681-59f7-4882-a4fa-2aa36561523b'
Now, I might be wrong but I noticed something in the
import_resources_individually()
function of the .../preset_cli/cli/superset/sync/native/command.py module.It seems to me that the function is only extracting the
dataset_uuid
attribute from the dashboard yaml files, but it's completely disregarding the['metadata']['native_filter_configuration']['id']['targets']['datasetUuid']
attribute from the filter info of the dashboard. This attribute is well known on Superset, which uses also a function calledfind_native_filter_datasets()
to extract those from the assets when importing data.I think the fact that
superset-cli
ignores that attribute creates problems, because I don't think it's a coincidence that this error is happening with a dataset that has no chart associated, but it's still used as a filter in a dashboard. It looks like the dataset is completely ignored or missing from theconfigs
dict exactly because of this reason.The text was updated successfully, but these errors were encountered: