[AIRFLOW-814] Fix Presto*CheckOperator.__init__ Use keyword args when initializing a Presto*CheckOperator.
Closes #2029 from patrickmckenna/fix-presto-check- operators (cherry picked from commit d428a90286a8d34db65bb8f4d8252fbbe9665e55) 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/adaebc2d Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/adaebc2d Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/adaebc2d Branch: refs/heads/v1-8-stable Commit: adaebc2d7afea4b996a0f49ee850bdb6dd6a0cfc Parents: 0b47790 Author: Patrick McKenna <[email protected]> Authored: Tue Feb 7 21:54:13 2017 +0100 Committer: Bolke de Bruin <[email protected]> Committed: Tue Feb 7 21:55:06 2017 +0100 ---------------------------------------------------------------------- airflow/operators/presto_check_operator.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/adaebc2d/airflow/operators/presto_check_operator.py ---------------------------------------------------------------------- diff --git a/airflow/operators/presto_check_operator.py b/airflow/operators/presto_check_operator.py index 6dfcdec..e6e1fd8 100644 --- a/airflow/operators/presto_check_operator.py +++ b/airflow/operators/presto_check_operator.py @@ -80,7 +80,9 @@ class PrestoValueCheckOperator(ValueCheckOperator): self, sql, pass_value, tolerance=None, presto_conn_id='presto_default', *args, **kwargs): - super(PrestoValueCheckOperator, self).__init__(sql, pass_value, tolerance, *args, **kwargs) + super(PrestoValueCheckOperator, self).__init__( + sql=sql, pass_value=pass_value, tolerance=tolerance, + *args, **kwargs) self.presto_conn_id = presto_conn_id def get_db_hook(self): @@ -110,7 +112,8 @@ class PrestoIntervalCheckOperator(IntervalCheckOperator): presto_conn_id='presto_default', *args, **kwargs): super(PrestoIntervalCheckOperator, self).__init__( - table, metrics_thresholds, date_filter_column, days_back, + table=table, metrics_thresholds=metrics_thresholds, + date_filter_column=date_filter_column, days_back=days_back, *args, **kwargs) self.presto_conn_id = presto_conn_id
