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 Saleh Hindi committed Jun 9, 2017
1 parent 8eb860f commit 94266a6
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 94266a6

Please sign in to comment.