eladkal commented on code in PR #25412:
URL: https://github.com/apache/airflow/pull/25412#discussion_r933764651
##########
airflow/providers/jdbc/operators/jdbc.py:
##########
@@ -57,16 +57,21 @@ def __init__(
jdbc_conn_id: str = 'jdbc_default',
autocommit: bool = False,
parameters: Optional[Union[Iterable, Mapping]] = None,
+ fetch_results: bool = False,
**kwargs,
) -> None:
super().__init__(**kwargs)
self.parameters = parameters
self.sql = sql
self.jdbc_conn_id = jdbc_conn_id
self.autocommit = autocommit
+ self.fetch_results = fetch_results
self.hook = None
def execute(self, context: 'Context'):
self.log.info('Executing: %s', self.sql)
hook = JdbcHook(jdbc_conn_id=self.jdbc_conn_id)
- return hook.run(self.sql, self.autocommit, parameters=self.parameters,
handler=fetch_all_handler)
+ if self.fetch_results:
Review Comment:
Why do we need this parameter?
This is operator not hook so it looks like fetch_results = do_xcom_push ?
Did I miss something?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]