- Homebrew
- git
- Python 3.9 or higher
- pip
- Docker Desktop
- Clone this repository
git clone https://github.com/snhou/cosmos-demo-without-astro-cli.git
- Change into the
cosmos-demo-without-astro-cli
directory
cd cosmos-demo-without-astro-cli
- Install virtual environment
python3 -m venv venv
- Enter into venv
source venv/bin/activate
- Update pip
python3 -m pip install --upgrade pip
- Install dependencies
python3 -m pip install -r requirements.txt
- docker pull airflow image
docker pull apache/airflow:2.9.2
- Open Docker Desktop and run docker-compose.yaml
docker compose build
docker compose up -d
- Connect to postgres
Connection Id : airflow_metadata_db
Connection Type : Postgres
Host : host.docker.internal
Database : airflow
Login : airflow
Password : airflow
Port : 5432
- Trigger DAGs
- Use brew to install
brew install pgcli
- Use pgcli to connect postgres db
pgcli -h localhost -p 5432 -u airflow
- pwd:airflow
- Clear window
\! clear
- List database
\l
- List tables
\dt
- List all table, view,
\z
- list schema names
\dn
- Show now schema
SHOW SEARCH_PATH;
- Change schema
SET search_path TO {schema name}