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

GreatExpectationsOperator is overriding database name with schema #107

Open
qwertyyuiop01 opened this issue Apr 14, 2023 · 2 comments
Open
Assignees

Comments

@qwertyyuiop01
Copy link

qwertyyuiop01 commented Apr 14, 2023

hello,

Usecase: Database name is different from schema names and multiple schemas are available..

  1. Trying to connect to redshift db name: main (using conn_id and database name is passed in airflow UI) is failing when schema= "login" or data_asset_name="schema.table_name" is passed as parameter to GreatExpectationsOperator

Error: connection failed for database login.

  1. If schema is not passed as parameter or with data_asset_name then seeing

InvalidSchemaName: schema "main" does not exist

Screenshot 2023-04-14 at 2 22 21 PM

@mpgreg
Copy link
Contributor

mpgreg commented Apr 28, 2023

Same thing happens with postgres.

@mpgreg
Copy link
Contributor

mpgreg commented Apr 28, 2023

Need to update regarding the change to postgres hook. apache/airflow#26744. Schema should be passed as option in the uri. Such as:

AIRFLOW_CONN_POSTGRES_DEFAULT='postgresql://postgres:postgres@host:5432/postgres?options=-csearch_path%3Dpublic'

mpgreg pushed a commit to mpgreg/airflow-provider-great-expectations that referenced this issue Apr 29, 2023
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

No branches or pull requests

3 participants