-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
Labels
Description
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
- I have searched existing FAQs and this question is not already answered
- The answer provides accurate, helpful information
- I have included any relevant code examples or links
Reactions are currently unavailable