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

Override time grain in annotations #5084

Merged
merged 1 commit into from
May 30, 2018

Conversation

betodealmeida
Copy link
Member

Allow overriding the time grain of time series annotations.

The good news is that we've unified the granularity of Druid and SQLAlchemy, using ISO duration strings, so we can apply the time grain of a Druid time series to a SQLAlchemy time series annotation, and vice versa.

The bad news is that this is currently a bit ugly because we don't know if the time series annotation has a SQLAlchemy or a Druid datasource. So we pass the current time grain in both granularity and time_grain_sqla. This only works if the SQLAlchemy datasource has a main temporal table configured.

In the future we should unify this as a single parameter, IMHO.

The screenshot below shows an annotation that was saved with hourly grain (sqla_hourly) being loaded with daily grain. Note the new checkbox, "Override time grain":

screen shot 2018-05-25 at 12 46 32 pm

@codecov-io
Copy link

Codecov Report

Merging #5084 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #5084   +/-   ##
=======================================
  Coverage   77.53%   77.53%           
=======================================
  Files          44       44           
  Lines        8710     8710           
=======================================
  Hits         6753     6753           
  Misses       1957     1957

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 c18ef89...80f2ea8. Read the comment docs.

@mistercrunch mistercrunch merged commit 875d0b5 into apache:master May 30, 2018
@mistercrunch mistercrunch deleted the DPTOOLS-465_annotation_time_grain branch May 30, 2018 22:29
timifasubaa pushed a commit to timifasubaa/incubator-superset that referenced this pull request May 31, 2018
timifasubaa pushed a commit to airbnb/superset-fork that referenced this pull request Jul 25, 2018
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.26.0 labels Feb 27, 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 🚢 0.26.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants