Skip to content

Conversation

@JDarDagran
Copy link
Contributor

Currently you need to pass runtime_parameters argument to explicitly set e.g. search_path in PostgresOperator.
The solution IMO is not that good. It introduces use of psycopg2.SQL which is not compatible with sql attribute type.
Moreover, it overcomplicates things, does not maintain same session variables outside of PostgresOperator execution and would be problematic to implement when removing PostgresOperator which is marked as deprecated class.

Additional motivation is that I'd like to use PostgresOperator's hook after it's execution but with the same session params in OpenLineage integration. This PR allows to do this easily.

for PostgresOperator.

Signed-off-by: Jakub Dardzinski <kuba0221@gmail.com>
@JDarDagran JDarDagran force-pushed the postgres/use-options branch from 654bb44 to 25aaba1 Compare July 4, 2023 14:50
Copy link
Contributor

@vincbeck vincbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@potiuk potiuk merged commit 56eae9c into apache:main Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants