From 7cceaa6080b1b8a6aa04d049cb9fd593d77a8722 Mon Sep 17 00:00:00 2001 From: Josh Fell Date: Wed, 3 Aug 2022 12:11:59 -0400 Subject: [PATCH] Correctly render `results_parser_callable` param in Qubole docs Within the Python API docs for both `QuboleCheckOperator` and `QuboleValueCheckOperator`, the `results_parser_callable` parameter is improperly listed under a "kwargs" section. This could be confusing to users reading the docs as this is an explicit input to these operators rather part of catch-all keyword args. --- .../qubole/operators/qubole_check.py | 39 +++++++------------ 1 file changed, 13 insertions(+), 26 deletions(-) diff --git a/airflow/providers/qubole/operators/qubole_check.py b/airflow/providers/qubole/operators/qubole_check.py index 950c0d62fc4a..8e41df2d0aa5 100644 --- a/airflow/providers/qubole/operators/qubole_check.py +++ b/airflow/providers/qubole/operators/qubole_check.py @@ -86,19 +86,15 @@ class QuboleCheckOperator(_QuboleCheckOperatorMixin, SQLCheckOperator, QuboleOpe :ref:`howto/operator:QuboleCheckOperator` :param qubole_conn_id: Connection id which consists of qds auth_token + :param results_parser_callable: This is an optional parameter to extend the flexibility of parsing the + results of Qubole command to the users. This is a Python callable which can hold the logic to parse + list of rows returned by Qubole command. By default, only the values on first row are used for + performing checks. This callable should return a list of records on which the checks have to be + performed. kwargs: - Arguments specific to Qubole command can be referred from QuboleOperator docs. - :results_parser_callable: This is an optional parameter to - extend the flexibility of parsing the results of Qubole - command to the users. This is a python callable which - can hold the logic to parse list of rows returned by Qubole command. - By default, only the values on first row are used for performing checks. - This callable should return a list of records on - which the checks have to be performed. - .. note:: All fields in common with template fields of QuboleOperator and SQLCheckOperator are template-supported. @@ -138,28 +134,19 @@ class QuboleValueCheckOperator(_QuboleCheckOperatorMixin, SQLValueCheckOperator, is not within the permissible limit of expected value. :param qubole_conn_id: Connection id which consists of qds auth_token - :param pass_value: Expected value of the query results. - - :param tolerance: Defines the permissible pass_value range, for example if - tolerance is 2, the Qubole command output can be anything between - -2*pass_value and 2*pass_value, without the operator erring out. - - + :param tolerance: Defines the permissible pass_value range, for example if tolerance is 2, the Qubole + command output can be anything between -2*pass_value and 2*pass_value, without the operator erring + out. + :param results_parser_callable: This is an optional parameter to extend the flexibility of parsing the + results of Qubole command to the users. This is a Python callable which can hold the logic to parse + list of rows returned by Qubole command. By default, only the values on first row are used for + performing checks. This callable should return a list of records on which the checks have to be + performed. kwargs: - Arguments specific to Qubole command can be referred from QuboleOperator docs. - :results_parser_callable: This is an optional parameter to - extend the flexibility of parsing the results of Qubole - command to the users. This is a python callable which - can hold the logic to parse list of rows returned by Qubole command. - By default, only the values on first row are used for performing checks. - This callable should return a list of records on - which the checks have to be performed. - - .. note:: All fields in common with template fields of QuboleOperator and SQLValueCheckOperator are template-supported. """