Course
data-engineering-zoomcamp
Question
How can I solve the error 'OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused'
Answer
on the ingest_script.py, we have defined the DB parameter, pg_host = localhost in our engine yet we ran the container with --pg-host=pgdatabase.
Solution: Change pg_host from localhost to pgdatabase on the ingest_script.py
Checklist
Course
data-engineering-zoomcamp
Question
How can I solve the error 'OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused'
Answer
on the ingest_script.py, we have defined the DB parameter, pg_host = localhost in our engine yet we ran the container with --pg-host=pgdatabase.
Solution: Change pg_host from localhost to pgdatabase on the ingest_script.py
Checklist