Skip to content
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

feat: add endpoint to export saved queries using new format #11447

Merged
merged 15 commits into from Oct 30, 2020

Conversation

betodealmeida
Copy link
Member

SUMMARY

In line with #11167, this PR adds a new endpoint to export saved queries in the zipped YAML format. This will allow users to easily migrate saved queries between Superset instances.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A

TEST PLAN

Added unit tests for the API and for the new ExportSavedQueriesCommand.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

@betodealmeida betodealmeida changed the title feat: add backend to export saved queries using new format feat: add endpoint to export saved queries using new format Oct 27, 2020
@rusackas
Copy link
Member

A rebase should fix the broken E2E test (see #11453)

@codecov-io
Copy link

codecov-io commented Oct 28, 2020

Codecov Report

Merging #11447 into master will decrease coverage by 4.27%.
The diff coverage is 97.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11447      +/-   ##
==========================================
- Coverage   66.65%   62.37%   -4.28%     
==========================================
  Files         863      864       +1     
  Lines       41048    41114      +66     
  Branches     3693     3693              
==========================================
- Hits        27359    25644    -1715     
- Misses      13592    15291    +1699     
- Partials       97      179      +82     
Flag Coverage Δ
#cypress ?
#javascript 62.92% <ø> (ø)
#python 62.05% <97.14%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset/charts/api.py 76.98% <ø> (ø)
superset/databases/api.py 90.56% <ø> (ø)
superset/models/sql_lab.py 90.97% <ø> (ø)
superset/queries/saved_queries/commands/export.py 95.34% <95.34%> (ø)
superset/datasets/api.py 92.77% <100.00%> (+0.04%) ⬆️
superset/queries/saved_queries/api.py 97.43% <100.00%> (+1.13%) ⬆️
superset/queries/saved_queries/schemas.py 100.00% <100.00%> (ø)
superset-frontend/src/SqlLab/App.jsx 0.00% <0.00%> (-100.00%) ⬇️
superset-frontend/src/explore/App.jsx 0.00% <0.00%> (-100.00%) ⬇️
superset-frontend/src/dashboard/App.jsx 0.00% <0.00%> (-100.00%) ⬇️
... and 180 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 52294c8...0549ed2. Read the comment docs.

from superset.queries.saved_queries.filters import (
SavedQueryAllTextFilter,
SavedQueryFavoriteFilter,
SavedQueryFilter,
)
from superset.queries.saved_queries.schemas import (
get_delete_ids_schema,
get_export_ids_schema,
Copy link
Member

@dpgaspar dpgaspar Oct 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not related with this PR, sort of a note to self, this is asking to be DRY'ed

@betodealmeida betodealmeida merged commit 21f722c into apache:master Oct 30, 2020
auxten pushed a commit to auxten/incubator-superset that referenced this pull request Nov 20, 2020
…1447)

* Add UUID to saved_query

* Reuse function from previous migration

* Point to new head

* feat: add backend to export saved queries using new format
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.0.0 labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/L 🚢 1.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants