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

Return __time in Druid scan #4504

Merged
merged 3 commits into from
Mar 9, 2018
Merged

Conversation

betodealmeida
Copy link
Member

When doing a scan in Druid we're not returning the temporal column __time, which is needed for the play slider.

I also fixed the status URL, which is broken in master.

superset/viz.py Outdated
@@ -2040,7 +2040,7 @@ def get_properties(self, d):
'radius': self.fixed_value if self.fixed_value else d.get(self.metric),
'cat_color': d.get(self.dim) if self.dim else None,
'position': d.get('spatial'),
'__timestamp': d.get('__timestamp'),
'__timestamp': d.get('__timestamp') or d.get('__time'),
Copy link
Member

Choose a reason for hiding this comment

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

There's a constant in scope that you can use: DTTM_ALIAS : d.get(DTTM_ALIAS) or d.get('__time'),

Copy link
Member

Choose a reason for hiding this comment

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

We could introduce a DRUID_DTTM_ALIAS constant but may be out of scope for this PR

@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@3a58dc7). Click here to learn what that means.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #4504   +/-   ##
=========================================
  Coverage          ?   71.12%           
=========================================
  Files             ?      187           
  Lines             ?    14781           
  Branches          ?     1083           
=========================================
  Hits              ?    10513           
  Misses            ?     4265           
  Partials          ?        3
Impacted Files Coverage Δ
superset/viz.py 77.74% <ø> (ø)
superset/connectors/druid/models.py 76.25% <0%> (ø)

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 3a58dc7...c439307. Read the comment docs.

@mistercrunch mistercrunch merged commit 1647004 into apache:master Mar 9, 2018
@mistercrunch mistercrunch deleted the fix_play_druid branch March 9, 2018 23:28
john-bodley pushed a commit to john-bodley/superset that referenced this pull request Mar 13, 2018
* Return __time in Druid scan

* use constant instead of __timestamp

* Fix lint

(cherry picked from commit 1647004)
mistercrunch pushed a commit to lyft/incubator-superset that referenced this pull request Mar 14, 2018
* Return __time in Druid scan

* use constant instead of __timestamp

* Fix lint

(cherry picked from commit 1647004)
hughhhh pushed a commit to lyft/incubator-superset that referenced this pull request Apr 1, 2018
* Cherry pick apache#4581

* Add flask-compress cherry

* Add shortner fix

* Add Return __time in Druid scan apache#4504

* Picking cherry Fixing regression from apache#4500 (apache#4549)

* [bugfix] SQL Lab 'MySQL has gone away'

It appears the 'MySQL has gone away' is triggered by the line of code
I wrapped in a try block here.

This is a temporary fix, there will be another PR shortly getting to the
bottom of this.

Related:
https://github.com/lyft/druidstream/issues/40
michellethomas pushed a commit to michellethomas/panoramix that referenced this pull request May 24, 2018
* Return __time in Druid scan

* use constant instead of __timestamp

* Fix lint
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
* Return __time in Druid scan

* use constant instead of __timestamp

* Fix lint
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.24.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.24.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants