diff --git a/superset/assets/visualizations/deckgl/layers/scatter.jsx b/superset/assets/visualizations/deckgl/layers/scatter.jsx index 087df3d7ef363..26d320c502713 100644 --- a/superset/assets/visualizations/deckgl/layers/scatter.jsx +++ b/superset/assets/visualizations/deckgl/layers/scatter.jsx @@ -14,7 +14,7 @@ import { unitToRadius } from '../../../javascripts/modules/geo'; import sandboxedEval from '../../../javascripts/modules/sandbox'; function getStep(timeGrain) { - // grain in microseconds + // grain in milliseconds const MINUTE = 60 * 1000; const HOUR = 60 * MINUTE; const DAY = 24 * HOUR; diff --git a/superset/connectors/druid/models.py b/superset/connectors/druid/models.py index a16baf1039e65..0541af07e7754 100644 --- a/superset/connectors/druid/models.py +++ b/superset/connectors/druid/models.py @@ -130,7 +130,8 @@ def get_datasources(self): return json.loads(requests.get(endpoint).text) def get_druid_version(self): - endpoint = self.get_base_coordinator_url() + '/status' + endpoint = self.get_base_url( + self.coordinator_host, self.coordinator_port) + '/status' return json.loads(requests.get(endpoint).text)['version'] def refresh_datasources( @@ -1114,6 +1115,7 @@ def run_query( # noqa / druid order_direction = 'descending' if order_desc else 'ascending' if columns: + columns.append('__time') del qry['post_aggregations'] del qry['aggregations'] qry['dimensions'] = columns diff --git a/superset/viz.py b/superset/viz.py index 31e06967a1285..1adc16a11701f 100644 --- a/superset/viz.py +++ b/superset/viz.py @@ -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(DTTM_ALIAS) or d.get('__time'), } def get_data(self, df):