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

[bugfix] deck.gl on druid always shows animation #5107

Merged
merged 1 commit into from
May 31, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion superset/connectors/druid/models.py
Original file line number Diff line number Diff line change
@@ -1359,7 +1359,9 @@ def query(self, query_obj):
if df is None or df.size == 0:
raise Exception(_('No data was returned.'))
df.columns = [
DTTM_ALIAS if c == 'timestamp' else c for c in df.columns]
DTTM_ALIAS if c in ('timestamp', '__time') else c
for c in df.columns
]

is_timeseries = query_obj['is_timeseries'] \
if 'is_timeseries' in query_obj else True
5 changes: 3 additions & 2 deletions superset/viz.py
Original file line number Diff line number Diff line change
@@ -2150,7 +2150,8 @@ class DeckScatterViz(BaseDeckGLViz):

def query_obj(self):
fd = self.form_data
self.is_timeseries = fd.get('time_grain_sqla') or fd.get('granularity')
self.is_timeseries = bool(
fd.get('time_grain_sqla') or fd.get('granularity'))
self.point_radius_fixed = (
fd.get('point_radius_fixed') or {'type': 'fix', 'value': 500})
return super(DeckScatterViz, self).query_obj()
@@ -2168,7 +2169,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(DTTM_ALIAS) or d.get('__time'),
DTTM_ALIAS: d.get(DTTM_ALIAS),
}

def get_data(self, df):