From the course: Apache Airflow Essential Training

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Connecting to PostgreSQL

Connecting to PostgreSQL

- [Instructor] At this point, you should have Postgres installed and set up on your macOS device or on your Linux device. If you're using WSL for Windows, well, that's essentially a Linux device. Here I am in the virtual environment within which I'm running Airflow. I've temporarily stopped the Airflow scheduler and web server, and I'm going to run a pip install for the psycopg2-binary. This package is a Python library that provides a PostgreSQL adapter for Python. We'll use the classes in this library to interact with PostgreSQL. In order to connect to and use PostgreSQL, you need to install the provider's library for Postgres. This is an Apache Airflow provider package specifically designed for working with PostgreSQL databases. It provides a set of operators, hooks, and other components that facilitates integrating Airflow with Postgres. Once this is complete, we are now ready to use the psql command line to interact…

Contents