Skip to content

Conversation

@kandharvishnu
Copy link
Contributor

@kandharvishnu kandharvishnu commented Apr 15, 2025

closes: #49273

This PR fixes an issue in SQLExecuteQueryOperator where values from the connection’s extra_dejson are not passed to hook_params, even though the operator extends BaseSQLOperator, which supports them.

Currently, users have to manually duplicate values from the connection’s extras in the hook_params of the operator. This PR ensures that values in extra_dejson are automatically passed to hook_params, unless they are explicitly overridden.


@kandharvishnu kandharvishnu requested a review from eladkal as a code owner April 15, 2025 11:06
@kandharvishnu kandharvishnu force-pushed the hook_params_common_sql branch from b230dc0 to 42747fb Compare April 15, 2025 11:40
@kandharvishnu kandharvishnu force-pushed the hook_params_common_sql branch from 42747fb to 7fa2f6e Compare April 15, 2025 14:00
@eladkal eladkal requested a review from RNHTTR April 16, 2025 05:40
@kandharvishnu kandharvishnu force-pushed the hook_params_common_sql branch from 7fa2f6e to 9a77653 Compare April 21, 2025 09:23
@RNHTTR RNHTTR merged commit e2c9f9b into apache:main Apr 25, 2025
67 checks passed
jroachgolf84 pushed a commit to jroachgolf84/airflow that referenced this pull request Apr 30, 2025
…k_params (apache#49282)

* adding test cases

* changing to extra_dejson

* updating redis_hook

* Update providers/common/sql/tests/unit/common/sql/operators/test_sql.py

---------

Co-authored-by: Kalyan R <kalyan.ben10@live.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: SQLExecuteQueryOperator does not pass extra_dejson values to hook_params

3 participants