Skip to content

Commit

Permalink
Add analysisTypes to refresh druid (apache#1983)
Browse files Browse the repository at this point in the history
  • Loading branch information
noppanit authored and mistercrunch committed Jan 15, 2017
1 parent 495f646 commit 52c5d23
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions superset/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
# other tz can be overridden by providing a local_config
DRUID_IS_ACTIVE = True
DRUID_TZ = tz.tzutc()
DRUID_ANALYSIS_TYPES = ['cardinality']

# ----------------------------------------------------
# AUTHENTICATION CONFIG
Expand Down
6 changes: 4 additions & 2 deletions superset/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2018,7 +2018,8 @@ def latest_metadata(self):
segment_metadata = client.segment_metadata(
datasource=self.datasource_name,
intervals=lbound + '/' + rbound,
merge=self.merge_flag)
merge=self.merge_flag,
analysisTypes=config.get('DRUID_ANALYSIS_TYPES'))
except Exception as e:
logging.warning("Failed first attempt to get latest segment")
logging.exception(e)
Expand All @@ -2032,7 +2033,8 @@ def latest_metadata(self):
segment_metadata = client.segment_metadata(
datasource=self.datasource_name,
intervals=lbound + '/' + rbound,
merge=self.merge_flag)
merge=self.merge_flag,
analysisTypes=config.get('DRUID_ANALYSIS_TYPES'))
except Exception as e:
logging.warning("Failed 2nd attempt to get latest segment")
logging.exception(e)
Expand Down

0 comments on commit 52c5d23

Please sign in to comment.