You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "josh-fell (via GitHub)" <gi...@apache.org> on 2023/03/07 14:48:56 UTC

[GitHub] [airflow] josh-fell commented on a diff in pull request #29954: Add option to print SQL operator output to log

josh-fell commented on code in PR #29954:
URL: https://github.com/apache/airflow/pull/29954#discussion_r1127919881


##########
airflow/providers/common/sql/operators/sql.py:
##########
@@ -203,6 +203,7 @@ class SQLExecuteQueryOperator(BaseSQLOperator):
     :param split_statements: (optional) if split single SQL string into statements. By default, defers
         to the default value in the ``run`` method of the configured hook.
     :param return_last: (optional) return the result of only last statement (default: True).
+    :param print_to_log: (optional) if true operator output will be print to log (default: False).

Review Comment:
   WDYT about naming this param "show_output_in_logs" instead? Same vein for naming as "show_return_value_in_logs" as the `@task` decorator. And, I guess it's not _technically_ printing.



##########
airflow/providers/common/sql/operators/sql.py:
##########
@@ -203,6 +203,7 @@ class SQLExecuteQueryOperator(BaseSQLOperator):
     :param split_statements: (optional) if split single SQL string into statements. By default, defers
         to the default value in the ``run`` method of the configured hook.
     :param return_last: (optional) return the result of only last statement (default: True).
+    :param print_to_log: (optional) if true operator output will be print to log (default: False).

Review Comment:
   Maybe it's also worth mentioning to use some caution because this _could_ return a large amount of data to be exposed in the task logs too?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org