-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix backwards compatibility for RedshiftSQLOperator #27602
Fix backwards compatibility for RedshiftSQLOperator #27602
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope. Why? I do not understand it. the redshift_conn_id was used. What is the problem you wanted to solve?
How broken was it ? the parameter was used actually, so what you wrote does not seem correctl, maybe you expected redshift_conn_id to be set as field, but this is super-internal-detail and you should not rely on it. @syedahsn - could you please explain? |
@potiuk the problem is templating |
Then the right fix for it is removing "redshift_conn_id" from templated fields, not doing what the PR is doing (and adding conn_id). |
This is a deprecared operator. |
@syedahsn - can you please do it ? rather than adding some init_code, just removig "redshift_conn_id"/adding "conn_id" to templated_fields should fix the problem :) |
Oh yeah. Right 👍 |
The problem is not with init code, but with leaving redhshift_conn_id in templated_fields. everything will work when it is replaced with "conn_id". |
Yep. You are right. Its late hour here. I should not review code when I'm this tired 😴 |
Been there, done that @eladkal :D |
If I remove |
You dont remove from the signature. You only remove from the templated_fields |
Way better :) |
* Fix backwards compatibility for RedshiftSQLOperator * Remove redshift_conn_id from template fields
With the introduction of
SQLExecuteQueryOperator
, theRedshiftSQLOperator
was broken. This was due to the parameterredshift_conn_id
not being used. This PR fixes the issue by introducing theredshift_conn_id
as a variable to pass the connection id through to the base operator.related: #25717
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rst
or{issue_number}.significant.rst
, in newsfragments.