You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/02/15 14:18:59 UTC

[GitHub] [airflow] KevinYanesG opened a new pull request #21586: Fix postgres part of pipeline example of tutorial

KevinYanesG opened a new pull request #21586:
URL: https://github.com/apache/airflow/pull/21586


   
   related: #21457
   
   After a [discussion](https://github.com/apache/airflow/issues/21457#issuecomment-1034818729) with @potiuk, we figured out how to include the explicit creation of the postgres tables into the tutorial.
   
   One remark that I need to write here is that I couldn't manage it to work with a LOCAL connection, but instead I used the postgres_default. Maybe it is a bad practice and should be corrected, I just put it as an alternative, because it worked for me.
   
   
   


-- 
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



[GitHub] [airflow] github-actions[bot] commented on pull request #21586: Fix postgres part of pipeline example of tutorial

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #21586:
URL: https://github.com/apache/airflow/pull/21586#issuecomment-1040440726


   The PR is likely ready to be merged. No tests are needed as no important environment files, nor python files were modified by it. However, committers might decide that full test matrix is needed and add the 'full tests needed' label. Then you should rebase it to the latest main or amend the last commit of the PR, and push it with --force-with-lease.


-- 
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



[GitHub] [airflow] potiuk merged pull request #21586: Fix postgres part of pipeline example of tutorial

Posted by GitBox <gi...@apache.org>.
potiuk merged pull request #21586:
URL: https://github.com/apache/airflow/pull/21586


   


-- 
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



[GitHub] [airflow] potiuk commented on pull request #21586: Fix postgres part of pipeline example of tutorial

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #21586:
URL: https://github.com/apache/airflow/pull/21586#issuecomment-1040441982


   > One remark that I need to write here is that I couldn't manage it to work with a LOCAL connection, but instead I used the postgres_default. Maybe it is a bad practice and should be corrected, I just put it as an alternative, because it worked for me.
   
   I think It's even better to leave postgres_default. It's a good practice for anyone who starts their adventure with Airflow. I will make a suggestion for it.


-- 
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



[GitHub] [airflow] KevinYanes commented on a change in pull request #21586: Fix postgres part of pipeline example of tutorial

Posted by GitBox <gi...@apache.org>.
KevinYanes commented on a change in pull request #21586:
URL: https://github.com/apache/airflow/pull/21586#discussion_r807007979



##########
File path: docs/apache-airflow/tutorial.rst
##########
@@ -373,11 +373,42 @@ We need to have Docker and Postgres installed.
 We will be using this `docker file <https://airflow.apache.org/docs/apache-airflow/stable/start/docker.html#docker-compose-yaml>`_
 Follow the instructions properly to set up Airflow.
 
-Create a Employee table in Postgres using this:
+We need to add a connection to Postgres. Go to the UI and click "Admin" >> "Connections". Specify the following for each field:
+
+- Conn id: LOCAL
+- Conn Type: postgres
+- Host: postgres
+- Schema: <DATABASE_NAME>
+- Login: airflow
+- Password: airflow
+- Port: 5432
+
+Alternatively, you can use the postgres_default connection. If one uses this, one should change the value of ``postgres_conn_id`` in the DAG definition:

Review comment:
       Thanks for the review!
   One small comment maybe in the code `postgres_conn_id=LOCAL` should be changed to `postgres_conn_id=postgres_default` for complete correctness :)

##########
File path: docs/apache-airflow/tutorial.rst
##########
@@ -373,11 +373,42 @@ We need to have Docker and Postgres installed.
 We will be using this `docker file <https://airflow.apache.org/docs/apache-airflow/stable/start/docker.html#docker-compose-yaml>`_
 Follow the instructions properly to set up Airflow.
 
-Create a Employee table in Postgres using this:
+We need to add a connection to Postgres. Go to the UI and click "Admin" >> "Connections". Specify the following for each field:
+
+- Conn id: LOCAL
+- Conn Type: postgres
+- Host: postgres
+- Schema: <DATABASE_NAME>
+- Login: airflow
+- Password: airflow
+- Port: 5432
+
+Alternatively, you can use the postgres_default connection. If one uses this, one should change the value of ``postgres_conn_id`` in the DAG definition:

Review comment:
       Thanks for the review!
   One small comment: In this case, maybe in the code `postgres_conn_id=LOCAL` should be changed to `postgres_conn_id=postgres_default` for complete correctness :)




-- 
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



[GitHub] [airflow] potiuk commented on a change in pull request #21586: Fix postgres part of pipeline example of tutorial

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #21586:
URL: https://github.com/apache/airflow/pull/21586#discussion_r806994508



##########
File path: docs/apache-airflow/tutorial.rst
##########
@@ -373,11 +373,42 @@ We need to have Docker and Postgres installed.
 We will be using this `docker file <https://airflow.apache.org/docs/apache-airflow/stable/start/docker.html#docker-compose-yaml>`_
 Follow the instructions properly to set up Airflow.
 
-Create a Employee table in Postgres using this:
+We need to add a connection to Postgres. Go to the UI and click "Admin" >> "Connections". Specify the following for each field:
+
+- Conn id: LOCAL
+- Conn Type: postgres
+- Host: postgres
+- Schema: <DATABASE_NAME>
+- Login: airflow
+- Password: airflow
+- Port: 5432
+
+Alternatively, you can use the postgres_default connection. If one uses this, one should change the value of ``postgres_conn_id`` in the DAG definition:

Review comment:
       It's OK to use "postgres_default" only  for it.




-- 
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



[GitHub] [airflow] KevinYanes commented on a change in pull request #21586: Fix postgres part of pipeline example of tutorial

Posted by GitBox <gi...@apache.org>.
KevinYanes commented on a change in pull request #21586:
URL: https://github.com/apache/airflow/pull/21586#discussion_r807007979



##########
File path: docs/apache-airflow/tutorial.rst
##########
@@ -373,11 +373,42 @@ We need to have Docker and Postgres installed.
 We will be using this `docker file <https://airflow.apache.org/docs/apache-airflow/stable/start/docker.html#docker-compose-yaml>`_
 Follow the instructions properly to set up Airflow.
 
-Create a Employee table in Postgres using this:
+We need to add a connection to Postgres. Go to the UI and click "Admin" >> "Connections". Specify the following for each field:
+
+- Conn id: LOCAL
+- Conn Type: postgres
+- Host: postgres
+- Schema: <DATABASE_NAME>
+- Login: airflow
+- Password: airflow
+- Port: 5432
+
+Alternatively, you can use the postgres_default connection. If one uses this, one should change the value of ``postgres_conn_id`` in the DAG definition:

Review comment:
       Thanks for the review!
   One small comment maybe in the code `postgres_conn_id=LOCAL` should be changed to `postgres_conn_id=postgres_default` for complete correctness :)




-- 
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



[GitHub] [airflow] KevinYanesG commented on a change in pull request #21586: Fix postgres part of pipeline example of tutorial

Posted by GitBox <gi...@apache.org>.
KevinYanesG commented on a change in pull request #21586:
URL: https://github.com/apache/airflow/pull/21586#discussion_r807111621



##########
File path: docs/apache-airflow/tutorial.rst
##########
@@ -373,11 +373,42 @@ We need to have Docker and Postgres installed.
 We will be using this `docker file <https://airflow.apache.org/docs/apache-airflow/stable/start/docker.html#docker-compose-yaml>`_
 Follow the instructions properly to set up Airflow.
 
-Create a Employee table in Postgres using this:
+We need to add a connection to Postgres. Go to the UI and click "Admin" >> "Connections". Specify the following for each field:
+
+- Conn id: LOCAL
+- Conn Type: postgres
+- Host: postgres
+- Schema: <DATABASE_NAME>
+- Login: airflow
+- Password: airflow
+- Port: 5432
+
+Alternatively, you can use the postgres_default connection. If one uses this, one should change the value of ``postgres_conn_id`` in the DAG definition:

Review comment:
       Now, it should be fine!




-- 
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



[GitHub] [airflow] potiuk merged pull request #21586: Fix postgres part of pipeline example of tutorial

Posted by GitBox <gi...@apache.org>.
potiuk merged pull request #21586:
URL: https://github.com/apache/airflow/pull/21586


   


-- 
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



[GitHub] [airflow] KevinYanesG commented on a change in pull request #21586: Fix postgres part of pipeline example of tutorial

Posted by GitBox <gi...@apache.org>.
KevinYanesG commented on a change in pull request #21586:
URL: https://github.com/apache/airflow/pull/21586#discussion_r807111621



##########
File path: docs/apache-airflow/tutorial.rst
##########
@@ -373,11 +373,42 @@ We need to have Docker and Postgres installed.
 We will be using this `docker file <https://airflow.apache.org/docs/apache-airflow/stable/start/docker.html#docker-compose-yaml>`_
 Follow the instructions properly to set up Airflow.
 
-Create a Employee table in Postgres using this:
+We need to add a connection to Postgres. Go to the UI and click "Admin" >> "Connections". Specify the following for each field:
+
+- Conn id: LOCAL
+- Conn Type: postgres
+- Host: postgres
+- Schema: <DATABASE_NAME>
+- Login: airflow
+- Password: airflow
+- Port: 5432
+
+Alternatively, you can use the postgres_default connection. If one uses this, one should change the value of ``postgres_conn_id`` in the DAG definition:

Review comment:
       Now, it should be fine!




-- 
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



[GitHub] [airflow] potiuk commented on a change in pull request #21586: Fix postgres part of pipeline example of tutorial

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #21586:
URL: https://github.com/apache/airflow/pull/21586#discussion_r806994508



##########
File path: docs/apache-airflow/tutorial.rst
##########
@@ -373,11 +373,42 @@ We need to have Docker and Postgres installed.
 We will be using this `docker file <https://airflow.apache.org/docs/apache-airflow/stable/start/docker.html#docker-compose-yaml>`_
 Follow the instructions properly to set up Airflow.
 
-Create a Employee table in Postgres using this:
+We need to add a connection to Postgres. Go to the UI and click "Admin" >> "Connections". Specify the following for each field:
+
+- Conn id: LOCAL
+- Conn Type: postgres
+- Host: postgres
+- Schema: <DATABASE_NAME>
+- Login: airflow
+- Password: airflow
+- Port: 5432
+
+Alternatively, you can use the postgres_default connection. If one uses this, one should change the value of ``postgres_conn_id`` in the DAG definition:

Review comment:
       It's OK to use "postgres_default" for it.




-- 
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



[GitHub] [airflow] potiuk commented on a change in pull request #21586: Fix postgres part of pipeline example of tutorial

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #21586:
URL: https://github.com/apache/airflow/pull/21586#discussion_r807016582



##########
File path: docs/apache-airflow/tutorial.rst
##########
@@ -373,11 +373,42 @@ We need to have Docker and Postgres installed.
 We will be using this `docker file <https://airflow.apache.org/docs/apache-airflow/stable/start/docker.html#docker-compose-yaml>`_
 Follow the instructions properly to set up Airflow.
 
-Create a Employee table in Postgres using this:
+We need to add a connection to Postgres. Go to the UI and click "Admin" >> "Connections". Specify the following for each field:
+
+- Conn id: LOCAL
+- Conn Type: postgres
+- Host: postgres
+- Schema: <DATABASE_NAME>
+- Login: airflow
+- Password: airflow
+- Port: 5432
+
+Alternatively, you can use the postgres_default connection. If one uses this, one should change the value of ``postgres_conn_id`` in the DAG definition:

Review comment:
       Yeah. Feel free to fixup :) 




-- 
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



[GitHub] [airflow] potiuk commented on pull request #21586: Fix postgres part of pipeline example of tutorial

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #21586:
URL: https://github.com/apache/airflow/pull/21586#issuecomment-1040441982


   > One remark that I need to write here is that I couldn't manage it to work with a LOCAL connection, but instead I used the postgres_default. Maybe it is a bad practice and should be corrected, I just put it as an alternative, because it worked for me.
   
   I think It's even better to leave postgres_default. It's a good practice for anyone who starts their adventure with Airflow. I will make a suggestion for it.


-- 
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



[GitHub] [airflow] potiuk commented on a change in pull request #21586: Fix postgres part of pipeline example of tutorial

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #21586:
URL: https://github.com/apache/airflow/pull/21586#discussion_r806993319



##########
File path: docs/apache-airflow/tutorial.rst
##########
@@ -373,11 +373,42 @@ We need to have Docker and Postgres installed.
 We will be using this `docker file <https://airflow.apache.org/docs/apache-airflow/stable/start/docker.html#docker-compose-yaml>`_
 Follow the instructions properly to set up Airflow.
 
-Create a Employee table in Postgres using this:
+We need to add a connection to Postgres. Go to the UI and click "Admin" >> "Connections". Specify the following for each field:
+
+- Conn id: LOCAL
+- Conn Type: postgres
+- Host: postgres
+- Schema: <DATABASE_NAME>
+- Login: airflow
+- Password: airflow
+- Port: 5432
+
+Alternatively, you can use the postgres_default connection. If one uses this, one should change the value of ``postgres_conn_id`` in the DAG definition:

Review comment:
       ```suggestion
   You can use the postgres_default connection. You should change the value of ``postgres_conn_id`` in the DAG definition:
   ```




-- 
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



[GitHub] [airflow] github-actions[bot] commented on pull request #21586: Fix postgres part of pipeline example of tutorial

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #21586:
URL: https://github.com/apache/airflow/pull/21586#issuecomment-1040440726


   The PR is likely ready to be merged. No tests are needed as no important environment files, nor python files were modified by it. However, committers might decide that full test matrix is needed and add the 'full tests needed' label. Then you should rebase it to the latest main or amend the last commit of the PR, and push it with --force-with-lease.


-- 
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



[GitHub] [airflow] potiuk commented on a change in pull request #21586: Fix postgres part of pipeline example of tutorial

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #21586:
URL: https://github.com/apache/airflow/pull/21586#discussion_r806993319



##########
File path: docs/apache-airflow/tutorial.rst
##########
@@ -373,11 +373,42 @@ We need to have Docker and Postgres installed.
 We will be using this `docker file <https://airflow.apache.org/docs/apache-airflow/stable/start/docker.html#docker-compose-yaml>`_
 Follow the instructions properly to set up Airflow.
 
-Create a Employee table in Postgres using this:
+We need to add a connection to Postgres. Go to the UI and click "Admin" >> "Connections". Specify the following for each field:
+
+- Conn id: LOCAL
+- Conn Type: postgres
+- Host: postgres
+- Schema: <DATABASE_NAME>
+- Login: airflow
+- Password: airflow
+- Port: 5432
+
+Alternatively, you can use the postgres_default connection. If one uses this, one should change the value of ``postgres_conn_id`` in the DAG definition:

Review comment:
       ```suggestion
   You can use the postgres_default connection. You should change the value of ``postgres_conn_id`` in the DAG definition:
   ```

##########
File path: docs/apache-airflow/tutorial.rst
##########
@@ -373,11 +373,42 @@ We need to have Docker and Postgres installed.
 We will be using this `docker file <https://airflow.apache.org/docs/apache-airflow/stable/start/docker.html#docker-compose-yaml>`_
 Follow the instructions properly to set up Airflow.
 
-Create a Employee table in Postgres using this:
+We need to add a connection to Postgres. Go to the UI and click "Admin" >> "Connections". Specify the following for each field:
+
+- Conn id: LOCAL
+- Conn Type: postgres
+- Host: postgres
+- Schema: <DATABASE_NAME>
+- Login: airflow
+- Password: airflow
+- Port: 5432
+
+Alternatively, you can use the postgres_default connection. If one uses this, one should change the value of ``postgres_conn_id`` in the DAG definition:

Review comment:
       It's OK to use "postgres_default" for it.

##########
File path: docs/apache-airflow/tutorial.rst
##########
@@ -373,11 +373,42 @@ We need to have Docker and Postgres installed.
 We will be using this `docker file <https://airflow.apache.org/docs/apache-airflow/stable/start/docker.html#docker-compose-yaml>`_
 Follow the instructions properly to set up Airflow.
 
-Create a Employee table in Postgres using this:
+We need to add a connection to Postgres. Go to the UI and click "Admin" >> "Connections". Specify the following for each field:
+
+- Conn id: LOCAL
+- Conn Type: postgres
+- Host: postgres
+- Schema: <DATABASE_NAME>
+- Login: airflow
+- Password: airflow
+- Port: 5432
+
+Alternatively, you can use the postgres_default connection. If one uses this, one should change the value of ``postgres_conn_id`` in the DAG definition:

Review comment:
       It's OK to use "postgres_default" only  for it.

##########
File path: docs/apache-airflow/tutorial.rst
##########
@@ -373,11 +373,42 @@ We need to have Docker and Postgres installed.
 We will be using this `docker file <https://airflow.apache.org/docs/apache-airflow/stable/start/docker.html#docker-compose-yaml>`_
 Follow the instructions properly to set up Airflow.
 
-Create a Employee table in Postgres using this:
+We need to add a connection to Postgres. Go to the UI and click "Admin" >> "Connections". Specify the following for each field:
+
+- Conn id: LOCAL
+- Conn Type: postgres
+- Host: postgres
+- Schema: <DATABASE_NAME>
+- Login: airflow
+- Password: airflow
+- Port: 5432
+
+Alternatively, you can use the postgres_default connection. If one uses this, one should change the value of ``postgres_conn_id`` in the DAG definition:

Review comment:
       Yeah. Feel free to fixup :) 




-- 
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



[GitHub] [airflow] KevinYanes commented on a change in pull request #21586: Fix postgres part of pipeline example of tutorial

Posted by GitBox <gi...@apache.org>.
KevinYanes commented on a change in pull request #21586:
URL: https://github.com/apache/airflow/pull/21586#discussion_r807007979



##########
File path: docs/apache-airflow/tutorial.rst
##########
@@ -373,11 +373,42 @@ We need to have Docker and Postgres installed.
 We will be using this `docker file <https://airflow.apache.org/docs/apache-airflow/stable/start/docker.html#docker-compose-yaml>`_
 Follow the instructions properly to set up Airflow.
 
-Create a Employee table in Postgres using this:
+We need to add a connection to Postgres. Go to the UI and click "Admin" >> "Connections". Specify the following for each field:
+
+- Conn id: LOCAL
+- Conn Type: postgres
+- Host: postgres
+- Schema: <DATABASE_NAME>
+- Login: airflow
+- Password: airflow
+- Port: 5432
+
+Alternatively, you can use the postgres_default connection. If one uses this, one should change the value of ``postgres_conn_id`` in the DAG definition:

Review comment:
       Thanks for the review!
   One small comment: In this case, maybe in the code `postgres_conn_id=LOCAL` should be changed to `postgres_conn_id=postgres_default` for complete correctness :)




-- 
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