If you try to export with API 2 datasets with the same database, the same table name but different schemas, it returns you only 1 dataset

Expected results

Exporting of 2 datasets should give you 2 datasets (files)

Actual results

As the export feature uses table name as the file name for export it returns only 1 file for 2 datasets

Screenshots

Created datasets

Exported datasets

How to reproduce the bug

  1. Go to SuperSet web
  2. Create a database (I used Vertica)
  3. Create 2 tables with the same name but with the different schema in the DB
  4. Create 2 SuperSet datasets for the tables from step the previous step.
  5. Create 2 simple table charts for the 1 for each dataset from the previous step. (This step needs to be done as the export dataset endpoint doesn't work as expected, so I'm using chart export endpoint)
  6. Send GET request to https://{superset_host}:{port}/api/v1/chart/export/ and save archive in the response
  7. Unzip the archive and check the amount of files for datasets in {extracted_archive}/dataset/{database_name}/

Environment

(please complete the following information):

  • superset version: Superset 1.1.0
  • python version: Python 3.7.9
  • node.js version: not found

Comment From: sann05

It seems like there is no reason to export charts. Everything that you need to export/import dashboard in the exported JSON from the dashboard endpoint

Comment From: jhua8970

This is still an issue if users need to use the YAML exports to manage assets in Superset. The same issue exists for dashboard export in YAML format, since the exported files are named using dashboard titles/names.

Comment From: iamed2

Dashboards and charts use IDs to disambiguate between same-named entities, but datasets do not; this issue is still present on 4.0.1 with YAML dataset exports.

Unfortunately the original reporter closed the issue. Can maintainers please reopen it?

Comment From: sann05

Dashboards and charts use IDs to disambiguate between same-named entities, but datasets do not; this issue is still present on 4.0.1 with YAML dataset exports.

Unfortunately the original reporter closed the issue. Can maintainers please reopen it?

I can reopen that

Comment From: lxrvan

Dashboards and charts use IDs to disambiguate between same-named entities, but datasets do not; this issue is still present on 4.0.1 with YAML dataset exports.

Unfortunately the original reporter closed the issue. Can maintainers please reopen it?

Hi! please tell me if there is any news on solving this problem in v4.1.1/4.1.2?

Comment From: rusackas

No news that I'm aware of, but I'll ping @betodealmeida and @eschutho since they were looking at what to include (or not) with imports/exports in the not-so-distant past.

Obviously we're open to a PR if anyone needs to dig into this more urgently.

Comment From: eschutho

@geido can we put a bug bounty on this?