Skip to content
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

Pull the database name for the Postgres connection only from the connection definition #117

Merged
merged 10 commits into from Oct 10, 2023

Conversation

TJaniF
Copy link
Contributor

@TJaniF TJaniF commented Sep 20, 2023

Background: the Airflow Postgres connection uses the schema parameter to specify the database (see: https://airflow.apache.org/docs/apache-airflow-providers-postgres/stable/connections/postgres.html). This lead to a double use of the self.schema attribute in the operator in case of using it with postgres, both for the database and the schema which in effect meant if those values were not the same it did not work.

This PR changes the postgres connection to use the schema parameter defined in the connection itself as the database name and use the schema parameter of the operator (or a schema.table notation for the data_asset parameter) as the schema within the GX context.

@phanikumv phanikumv merged commit 71280b7 into astronomer:main Oct 10, 2023
6 checks passed
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.

None yet

2 participants