Skip to content

fix: create example DB if needed#16451

Merged
betodealmeida merged 3 commits into
apache:masterfrom
preset-io:fix_import_examples
Aug 27, 2021
Merged

fix: create example DB if needed#16451
betodealmeida merged 3 commits into
apache:masterfrom
preset-io:fix_import_examples

Conversation

@betodealmeida
Copy link
Copy Markdown
Member

SUMMARY

Added a better way of finding the examples database when loading examples; also has the benefit that the DB is created if it doesn't exist.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A

TESTING INSTRUCTIONS

Run superset load-examples, everything should work.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 25, 2021

Codecov Report

Merging #16451 (773ca06) into master (ac1d779) will decrease coverage by 0.21%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16451      +/-   ##
==========================================
- Coverage   76.61%   76.39%   -0.22%     
==========================================
  Files        1002     1002              
  Lines       53671    53658      -13     
  Branches     6857     6851       -6     
==========================================
- Hits        41121    40993     -128     
- Misses      12311    12426     +115     
  Partials      239      239              
Flag Coverage Δ
hive ?
mysql 81.52% <66.66%> (ø)
postgres 81.55% <66.66%> (ø)
presto ?
python 81.63% <66.66%> (-0.42%) ⬇️
sqlite 81.19% <66.66%> (+0.03%) ⬆️

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

Impacted Files Coverage Δ
superset/commands/importers/v1/examples.py 39.53% <50.00%> (ø)
superset/models/slice.py 86.41% <100.00%> (ø)
superset/db_engines/hive.py 0.00% <0.00%> (-82.15%) ⬇️
superset/db_engine_specs/hive.py 69.80% <0.00%> (-16.87%) ⬇️
superset/db_engine_specs/presto.py 83.47% <0.00%> (-6.49%) ⬇️
...ontrols/DndColumnSelectControl/DndFilterSelect.tsx 45.33% <0.00%> (-6.00%) ⬇️
superset/views/database/mixins.py 81.03% <0.00%> (-1.73%) ⬇️
superset/connectors/sqla/models.py 88.04% <0.00%> (-1.66%) ⬇️
superset/db_engine_specs/base.py 88.00% <0.00%> (-0.39%) ⬇️
...rset-frontend/src/explore/components/SaveModal.tsx 86.81% <0.00%> (-0.29%) ⬇️
... and 15 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 ac1d779...773ca06. Read the comment docs.

@betodealmeida betodealmeida added the need:merge The PR is ready to be merged label Aug 26, 2021
@betodealmeida betodealmeida merged commit 62d8ab7 into apache:master Aug 27, 2021
amitmiran137 pushed a commit to nielsen-oss/superset that referenced this pull request Aug 29, 2021
* upstream/master:
  fix: create example DB if needed (apache#16451)
  fix(native-filters): add handle undefined control value gracefully (apache#16468)
  Revert "chore: Changes the DatabaseSelector to use the new Select component (apache#16334)" (apache#16478)
  fix(explore): JS error for creating new metrics from columns (apache#16477)
  fix: queryEditor bug (apache#16452)
  docs: make code snippet usable with required imports (apache#16473)
  perf(dashboard): decouple redux props from dashboard components (apache#16421)
  perf(dashboard): reduce number of rerenders of Charts (apache#16444)
opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
* fix: create example DB if needed

* fix lint
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 28, 2021
* fix: create example DB if needed

* fix lint
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.4.0 First shipped in 1.4.0 labels Mar 13, 2024
qfcwell pushed a commit to qfcwell/superset that referenced this pull request May 12, 2026
* fix: create example DB if needed

* fix lint
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 need:merge The PR is ready to be merged size/XS 🚢 1.4.0 First shipped in 1.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants