Dear Support,
I have a PostgreSQL database on Azure and I connect it to via Python.
It worked well until yesterday, and starting today I have the following error message:
OperationalError: (psycopg2.OperationalError) could not translate host name "server_name.postgres.database.azure.com" to address: Temporary failure in name resolution
I have not changed anything in the configuration of the database or my Python script.
Here is what the script looks like:
import pandas as pd
from sqlalchemy import create_engine
engine = create_engine('postgresql+psycopg2://user:password@server_name:5432/database_name?sslmode=require')
df = pd.read_csv('my_file.csv')
df.to_sql('table_name',engine, if_exists = 'replace', index=False)
Do you know what could be the issue?
thank you!