ubuntu (version 22.04.2)
docker (version 20.10.24)
- Customize airflow docker image: change variables in
.env
- Run docker engine.
- Open terminal from project root, run
./build_image.sh
- Run
./run_locally.sh
- Airflow starts at
localhost:8080
- Default user/password:
ask-airflow
- Connection to databse:
- host:
localhost
- port:
2345
- database:
ask_db
- user/password:
ask_postgres_user
- host:
For more information see: Running Apache Airflow in Docker.
- Firstly configure Airflow Connection
- Google Cloud:
- Connection Id:
ask_google_cloud
- Connection Type: Google Cloud
- Scopes:
https://www.googleapis.com/auth/spreadsheets
- Project Id:
{from your Google Cloud}
- Keyfile Path/Keyfile JSON:
{from your Google Cloud}
- Connection Id:
- Postgres(default)
- Connection Id:
ask_db
- Connection Type: Postgres
- Host:
ask_postgres_db
- Schema:
ask_db
- Login/Password:
ask_postgres_user
- Connection Id:
- Google Cloud:
- Add Airflow Variables
- Google Sheets
- Key:
ask_google_sheet_id
- Value:
{google_sheet_id}
from spreadsheet URL:https://docs.google.com/spreadsheets/d/{google_sheet_id}/
- Key:
- Database
- Key:
ask_db_schema_name
- Value:
synchronizing_sheets
(default)
- Key:
- Google Sheets
- Make sure that your Google Cloud service account has read access
to Google spreadsheet given in Airflow variableask_google_sheet_id
Dependencies for local development can be found in requirements.txt
file.
Install by
pip install -r requirements.txt
Using virtual envinment (eg. venv) is recommended.
If following error occurs
ERROR: Could not build wheels for pendulum, which is required to install pyproject.toml-based projects
install packets:
sudo apt-get install build-essential libssl-dev libffi-dev python3-dev