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 main datetime column to dataset editor #17739

Merged
merged 2 commits into from
Dec 14, 2021

Conversation

betodealmeida
Copy link
Member

@betodealmeida betodealmeida commented Dec 14, 2021

SUMMARY

For feature parity with the old CRUD dataset editor, modify the dataset editor to allow specifying a main datetime column.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:

Screenshot 2021-12-14 at 14-11-26  DEV  Superset

After:

Screenshot 2021-12-13 at 17-59-59  DEV  Superset

Only temporal columns can be selected as a default datetime. The radio button is disabled when the column is not marked as temporal.

TESTING INSTRUCTIONS

  1. Load the cleaned_sales_data dataset and set a different column as the default datetime. Save.
  2. Open the dataset in Explore, the new default datetime column should be selected in the time filter.

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

codecov bot commented Dec 14, 2021

Codecov Report

Merging #17739 (ce4f40b) into master (0d2299c) will increase coverage by 0.07%.
The diff coverage is 80.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17739      +/-   ##
==========================================
+ Coverage   68.06%   68.13%   +0.07%     
==========================================
  Files        1653     1653              
  Lines       66374    66379       +5     
  Branches     7121     7121              
==========================================
+ Hits        45177    45227      +50     
+ Misses      19300    19255      -45     
  Partials     1897     1897              
Flag Coverage Δ
hive 81.78% <ø> (ø)
javascript 56.25% <80.00%> (+<0.01%) ⬆️
mysql 82.15% <ø> (ø)
postgres 82.20% <ø> (+0.01%) ⬆️
presto 82.06% <ø> (?)
python 82.69% <ø> (+0.15%) ⬆️
sqlite 81.88% <ø> (ø)

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

Impacted Files Coverage Δ
...end/src/components/Datasource/DatasourceEditor.jsx 69.09% <80.00%> (+0.23%) ⬆️
superset/dashboards/commands/importers/v1/utils.py 81.42% <0.00%> (ø)
superset/reports/commands/execute.py 91.22% <0.00%> (+0.38%) ⬆️
superset/common/query_object.py 95.62% <0.00%> (+0.54%) ⬆️
superset/models/core.py 90.00% <0.00%> (+0.73%) ⬆️
superset/connectors/sqla/models.py 88.42% <0.00%> (+1.34%) ⬆️
superset/commands/importers/v1/utils.py 91.30% <0.00%> (+2.17%) ⬆️
superset/reports/commands/log_prune.py 89.28% <0.00%> (+3.57%) ⬆️
superset/db_engine_specs/presto.py 89.97% <0.00%> (+5.63%) ⬆️

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 0d2299c...ce4f40b. Read the comment docs.

@betodealmeida
Copy link
Member Author

/testenv up

@github-actions
Copy link
Contributor

@betodealmeida Ephemeral environment spinning up at http://35.88.163.205:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

Copy link
Member

@lyndsiWilliams lyndsiWilliams left a comment

Choose a reason for hiding this comment

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

Looks good to me! 😁

@betodealmeida betodealmeida merged commit 63d9693 into apache:master Dec 14, 2021
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

shcoderAlex pushed a commit to casual-precision/superset that referenced this pull request Feb 7, 2022
* feat: add main dttm col to dataset editor

* Add tests
bwang221 pushed a commit to casual-precision/superset that referenced this pull request Feb 10, 2022
* feat: add main dttm col to dataset editor

* Add tests
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.5.0 labels Mar 13, 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/M 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants