You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "dinu-bilt (via GitHub)" <gi...@apache.org> on 2023/10/06 09:24:50 UTC

[I] Airflow postgres connection field schema points to database name [airflow]

dinu-bilt opened a new issue, #34799:
URL: https://github.com/apache/airflow/issues/34799

   ### Apache Airflow version
   
   2.7.1
   
   ### What happened
   
   Airflow's postgres connection configuration form has a field called  'schema'  which is misguiding as values mentioned here is used to refer to the database name instead of the schema name. It should be correctly named to 'database' or 'dbname'
   
   ### What you think should happen instead
   
   _No response_
   
   ### How to reproduce
   
   create a connection on the web UI and choose connection type as postgres.
   Have a dag connect to an postgres server with multiple databases
   provide the database name in the 'schema' field of the connection form- this would work if nothing else is incorrect in the etl
   now change the value in the schema field of the connection form to refer to a schema- this will fail unexpectedly as the schema name field actually points to the database name.
   
   ### Operating System
   
   Windows and Linux
   
   ### Versions of Apache Airflow Providers
   
   2.71
   
   ### Deployment
   
   Docker-Compose
   
   ### Deployment details
   
   _No response_
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Airflow postgres connection field schema points to database name [airflow]

Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on issue #34799:
URL: https://github.com/apache/airflow/issues/34799#issuecomment-1750272017

   Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Airflow postgres connection field schema points to database name [airflow]

Posted by "petr-larin (via GitHub)" <gi...@apache.org>.
petr-larin commented on issue #34799:
URL: https://github.com/apache/airflow/issues/34799#issuecomment-2045446472

   Hi Folks! When exporting a postgres connection from Airflow to json using `airflow connections export`, the field name is still `schema` rather than `database`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Airflow postgres connection field schema points to database name [airflow]

Posted by "dinu-bilt (via GitHub)" <gi...@apache.org>.
dinu-bilt closed issue #34799: Airflow postgres connection field schema points to database name
URL: https://github.com/apache/airflow/issues/34799


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Airflow postgres connection field schema points to database name [airflow]

Posted by "Taragolis (via GitHub)" <gi...@apache.org>.
Taragolis commented on issue #34799:
URL: https://github.com/apache/airflow/issues/34799#issuecomment-1750420831

   > now change the value in the schema field of the connection form to refer to a schema- this will fail unexpectedly as the schema name field actually points to the database name.
   
   https://airflow.apache.org/docs/apache-airflow-providers-postgres/stable/connections/postgres.html#postgresql-connection


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Airflow postgres connection field schema points to database name [airflow]

Posted by "GarimaUttam (via GitHub)" <gi...@apache.org>.
GarimaUttam commented on issue #34799:
URL: https://github.com/apache/airflow/issues/34799#issuecomment-1751631019

   Sir @Taragolis  I want to start contributing as a newcomer. Plz suggest me how to start contributing. Should I ask you to assign them or should we start cloning and try to make PR's directly. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Airflow postgres connection field schema points to database name [airflow]

Posted by "Taragolis (via GitHub)" <gi...@apache.org>.
Taragolis commented on issue #34799:
URL: https://github.com/apache/airflow/issues/34799#issuecomment-1751678095

   > I want to start contributing as a newcomer. Plz suggest me how to start contributing. Should I ask you to assign them or should we start cloning
   
   We have a documentation how to start contribution to Airflow:
   - [Contributor's Quick Start](https://github.com/apache/airflow/blob/main/CONTRIBUTORS_QUICK_START.rst#contributors-quick-start)
   - [Airflow Breeze](https://github.com/apache/airflow/blob/main/BREEZE.rst) 
   - [CONTRIBUTING.rst](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
   
   In general speaking you don't have to be assigned to the issue for start working on the issue, but it could be done if you feel that it required some time to implement new feature/bug fix for avoid situation that multiple contributors starts working on issue.
   
   For particular this on @pubudu91 already create PR and add tag `closes: #34799` so better select another one.
   
   In additional I want to say that if you know how to make Airflow better and you could propose the changes, then you don't have to create issue, you could create a PR and add description within.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Airflow postgres connection field schema points to database name [airflow]

Posted by "Taragolis (via GitHub)" <gi...@apache.org>.
Taragolis commented on issue #34799:
URL: https://github.com/apache/airflow/issues/34799#issuecomment-1750547691

   @dinu-bilt Are you sure that we need to close this issue? At least we could rename field in the Connection UI.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Airflow postgres connection field schema points to database name [airflow]

Posted by "hussein-awala (via GitHub)" <gi...@apache.org>.
hussein-awala closed issue #34799: Airflow postgres connection field schema points to database name
URL: https://github.com/apache/airflow/issues/34799


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Airflow postgres connection field schema points to database name [airflow]

Posted by "pubudu91 (via GitHub)" <gi...@apache.org>.
pubudu91 commented on issue #34799:
URL: https://github.com/apache/airflow/issues/34799#issuecomment-1751460701

   @Taragolis Was playing around with Airflow a bit, so tried out the fix suggested above. Can you please see if this is ok? If so, will send in a PR. https://github.com/apache/airflow/commit/802e39147e05e783d89fa0db1799d04530a14c1c
   
   The following is how it looks in the UI with my change. 
   ![Screenshot from 2023-10-06 18-15-43](https://github.com/apache/airflow/assets/6260009/bb0287ad-253e-41e1-a5fe-24e40eb657e5)
   
   Also, I suppose we'll have to update the docs at https://github.com/apache/airflow/blob/main/docs/apache-airflow-providers-postgres/connections/postgres.rst as well right? 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Airflow postgres connection field schema points to database name [airflow]

Posted by "Taragolis (via GitHub)" <gi...@apache.org>.
Taragolis commented on issue #34799:
URL: https://github.com/apache/airflow/issues/34799#issuecomment-1750570840

   I've marked as "good first issue" it should be a simple change, just need to implements `get_ui_field_behaviour` on PostgresHook
   
   Some examples in other Hooks
   
   https://github.com/apache/airflow/blob/659d94f0ae89f47a7d4b95d6c19ab7f87bd3a60f/airflow/providers/arangodb/hooks/arangodb.py#L137-L154
   
   https://github.com/apache/airflow/blob/284fa7000dd342967935aff39b1a6f83f9afb174/airflow/providers/amazon/aws/hooks/base_aws.py#L793-L819
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Airflow postgres connection field schema points to database name [airflow]

Posted by "dinu-bilt (via GitHub)" <gi...@apache.org>.
dinu-bilt commented on issue #34799:
URL: https://github.com/apache/airflow/issues/34799#issuecomment-1750554984

   Yes that'd  be ideal. Thanks 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org