You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "ARBS-23 (via GitHub)" <gi...@apache.org> on 2026/09/15 13:02:44 UTC

[I] bug(import): Bulk Export → Delete → Import fails to restore Datasets/Charts/Dashboards [superset]

ARBS-23 opened a new issue, #44309:
URL: https://github.com/apache/superset/issues/44309

   ### Bug description
   
   Bulk **Export → Delete → Import** of Datasets, Charts, or Dashboards from a UI-produced ZIP fails to restore the deleted assets.
   
   - **Datasets**: Import fails with `GENERIC_COMMAND_ERROR` (issue 1010) / UI message `Import dataset failed for an unknown reason`. Rows are not restored.
   - **Charts**: Import fails because each `charts/*.yaml` reports `{'dataset_uuid': ['Missing data for required field.']}`. Charts are not restored.
   - **Dashboards**: Import fails with the same `dataset_uuid` validation error on nested `charts/*.yaml` files. Dashboards are not restored.
   
   This breaks the expected backup/restore workflow: a ZIP produced by the list-view Export action should be able to restore the same assets after they were deleted.
   
   ### How to reproduce the bug
   
   1. Log in as a user who can export/delete/import Datasets, Charts, and Dashboards.
   2. Open **Datasets** → bulk-select multiple datasets (e.g. all on page 1) → **Export** → save the ZIP.
   3. With the same selection, **Delete** and confirm.
   4. Click **Import dataset**, upload the ZIP from step 2, click **Import**.
   5. Repeat steps 2–4 for **Charts** (toolbar **Import chart**; same bulk export → delete → import).
   6. Repeat steps 2–4 for **Dashboards** (exclude any system/default dashboard if present).
   
   ### Screenshots/recordings
   
   **Datasets import error**
   
   ![Import_bulk_dataset](https://github.com/user-attachments/assets/de517e88-ae1d-4d6f-bede-3bd8fee096ca)
   
   **Charts import error**
   
   ![Import_bulk_charts](https://github.com/user-attachments/assets/151b6836-e092-433b-ae0c-7ea1e0466f83)
   
   **Dashboards import error**
   
   ![Import_bulk_dashboards](https://github.com/user-attachments/assets/21ae87b4-a44f-4c63-8cd7-638a987b1e13)
   
   ### Expected behavior
   
   The exported ZIP restores the deleted Datasets / Charts / Dashboards. Restored assets appear in the lists and open normally.
   
   ### Actual behavior
   
   **Datasets**
   - UI: `Import dataset failed for an unknown reason`
   - API: `GENERIC_COMMAND_ERROR` (issue 1010)
   - Datasets are not restored
   
   **Charts**
   - UI: `An error occurred while importing chart: Error importing chart:`
   - Per-file validation on `charts/*.yaml`:
     ```json
     {"dataset_uuid": ["Missing data for required field."]}
     ```
   - Charts are not restored
   
   **Dashboards**
   - UI: `An error occurred while importing dashboard: Error importing dashboard:`
   - Nested `charts/*.yaml` files report the same `dataset_uuid` missing-field error
   - Dashboards are not restored
   
   ### Superset version
   
   6.1.0 (also observed on a deployment based on `apache/superset:6.1.0-py311`)
   
   ### Python version
   
   3.11
   
   ### Node version
   
   18 or greater
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   - OS: Windows 11
   - Role: user with edit/export/import permission
   - ZIP format from the list-view Export actions (not legacy JSON)
   - Sample export ZIPs created **before** delete (from the original reporter):
     - [dataset_export_20260814T152014.zip](https://github.com/thaind-kaopiz/fstl-381-attachments/raw/main/exports/dataset_export_20260814T152014.zip)
     - [chart_export_20260814T135245.zip](https://github.com/thaind-kaopiz/fstl-381-attachments/raw/main/exports/chart_export_20260814T135245.zip)
     - [dashboard_export_20260814T135502.zip](https://github.com/thaind-kaopiz/fstl-381-attachments/raw/main/exports/dashboard_export_20260814T135502.zip)
   - Chart/dashboard import schema requires `dataset_uuid` on chart YAML (`ImportV1ChartSchema`). Export writes `dataset_uuid` from `model.table` in `ExportChartsCommand._file_content`. If the exported chart YAML lacks that field (or related datasets are missing/unimportable from the bundle), validation fails with the message above.
   - Dataset import failing with the generic `DatasetImportError` / `GENERIC_COMMAND_ERROR` may be a separate failure in the dataset import path (possibly soft-delete twin / overwrite / schema validation). Worth checking whether `SOFT_DELETE` restore-via-import is involved when re-importing UUIDs after Delete.
   - Related historical `dataset_uuid: Missing data for required field` reports (different contexts; please treat as related, not duplicates of this restore-after-delete flow):
     - https://github.com/apache/superset/issues/22298
     - https://github.com/apache/superset/issues/31443
   - Soft-delete / restore-via-import work (may affect Delete → Import): https://github.com/apache/superset/pull/40130, https://github.com/apache/superset/pull/40129
   - Internal tracker (optional): gigaphoton/fabscape-superset#234
   
   ### 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] bug(import): Bulk Export → Delete → Import fails to restore Datasets/Charts/Dashboards [superset]

Posted by "rusackas (via GitHub) via notifications" <no...@superset.apache.org>.
rusackas commented on issue #44309:
URL: https://github.com/apache/superset/issues/44309#issuecomment-7371171498

   @ARBS-23 #44347 (thanks @L4XB!) fixed the chart and dashboard side of this, since exports now keep `dataset_uuid` even when the dataset was deleted. The dataset `GENERIC_COMMAND_ERROR` half couldn't be reproduced on `master`, so could you give that round trip a try on a recent build? If it works, we can close this out.
   


-- 
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] bug(import): Bulk Export → Delete → Import fails to restore Datasets/Charts/Dashboards [superset]

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

   ### Clearer reproduction (Charts)
   
   I found a more reliable way to reproduce the Chart import failure (`dataset_uuid: Missing data for required field`):
   
   1. Create or open a chart that is linked to a dataset.
   2. Delete the **dataset** that the chart depends on (not only the chart).
   3. Observe the chart is broken in Explore: **Missing dataset. The dataset linked to this chart may have been deleted.** (and **Failed to load chart data**).
   4. Export / re-import the chart (or a bulk chart ZIP that includes such charts).
   
   Import then fails validation on `charts/*.yaml` with:
   
   ```json
   {"dataset_uuid": ["Missing data for required field."]}
   ```
   
   The original issue steps (export → delete the chart/dashboard/dataset rows → re-import) still apply for the bulk restore case. This note clarifies that for **Charts**, deleting the **linked dataset** is the key trigger for the `dataset_uuid` missing-field error / broken Explore state before re-import.
   
   ![Missing dataset after linked dataset delete](https://gist.githubusercontent.com/ARBS-23/e035ebc8e16cfadafeb260230992c247/raw/935737678649d77844f58a7cb003d2adcff9774d/missing-dataset-after-delete.png)
   


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