Repository: incubator-airflow Updated Branches: refs/heads/v1-9-stable 38593dbd7 -> 84623da77
[AIRFLOW-1792] Missing intervals DruidOperator The DruidOperator allows you to template the intervals field which is important when you are doing backfills with Druid. This field was missing in the constructor and Airflow threw a warning Closes #2764 from Fokko/patch-1 (cherry picked from commit 3eb2dd86b9cdb5d83767d5969011a83c6521370d) Signed-off-by: Bolke de Bruin <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/84623da7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/84623da7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/84623da7 Branch: refs/heads/v1-9-stable Commit: 84623da77be81c4f8d517891fe70db3d882c471a Parents: 38593db Author: Fokko Driesprong <[email protected]> Authored: Wed Nov 8 19:40:21 2017 +0100 Committer: Bolke de Bruin <[email protected]> Committed: Wed Nov 8 19:40:50 2017 +0100 ---------------------------------------------------------------------- airflow/contrib/operators/druid_operator.py | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/84623da7/airflow/contrib/operators/druid_operator.py ---------------------------------------------------------------------- diff --git a/airflow/contrib/operators/druid_operator.py b/airflow/contrib/operators/druid_operator.py index fa8b1e3..9eeb614 100644 --- a/airflow/contrib/operators/druid_operator.py +++ b/airflow/contrib/operators/druid_operator.py @@ -34,10 +34,12 @@ class DruidOperator(BaseOperator): self, json_index_file, druid_ingest_conn_id='druid_ingest_default', + intervals=None, *args, **kwargs): super(DruidOperator, self).__init__(*args, **kwargs) self.conn_id = druid_ingest_conn_id + self.intervals=intervals with open(json_index_file) as data_file: self.index_spec = json.load(data_file)
