Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
[bugfix] deck.gl on druid always shows animation (apache#5107)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch authored May 31, 2018
1 parent f3778c3 commit 4ecd95a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion superset/connectors/druid/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions superset/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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):
Expand Down

0 comments on commit 4ecd95a

Please sign in to comment.