Hey community! I'm deploying meltano using airflow...
# announcements
m
Hey community! I'm deploying meltano using airflow as orchestrator and postgres as DB into production using the docker-compose file. However when I try to UP all services, I get the following error: As Meltano was the one who installed airflow and all its dependencies in .meltano, I don't where/how to add the psycopg2 library
n
Hey you need to add this alongside airflow in the meltano.yml file:
Copy code
orchestrators:
  - name: airflow
    pip_url: psycopg2==2.8.6 apache-airflow==1.10.12
Make sure to keep the airflow version fixed at what it is currently, not necessarily the version in my comment. Also make sure you delete the airflow venv in .meltano/orchestrators/airflow
m
Thank you @niall_woodward!!
d
@niall_woodward Is this always necessary when using Airflow with a Postgres metadata DB? If so, we should document that, but I was assuming it'd just work OOTB
n
That's just what I've been doing 😄 but after a bit more investigation there is a postgres package you're meant to install! https://airflow.apache.org/docs/stable/installation.html#extra-packages
So @murilo_tavolaro_de_nigris see how you get on without pyscopg2 and adding the postgres package to your airflow pip_url? So apache-airflow[postgres]==x
Ignore all the above you need the pyscopg2 not the postgres package, that's just for airflow operators.
You also need database client packages (Postgres or MySQL) if you want to use those databases.
d
@niall_woodward Good catch! We should mention that under https://meltano.com/docs/production.html#airflow-orchestrator, then: https://gitlab.com/meltano/meltano/-/issues/2378. I'll add it today.
m
Thank you!! It worked once I added psycopg2 🙂