When run very first pyspark script in pyspark notebook get error:
: org.postgresql.util.PSQLException: FATAL: database “:5432/postgres” does not exist
my script:
information_tables_df = spark.read.jdbc(jdbc_url, “information_schema.tables”, properties=jdbc_properties)
information_tables_df.select([“table_schema”, “table_name”]).show()
how i configured postgres:
RDS_ENDPOINT = “de-c4w3a1-rds.c9ocgmg8qz72.us-east-1.rds.amazonaws.com/”
jdbc_url = f"jdbc:postgresql://{RDS_ENDPOINT}:5432/postgres" # For PostgreSQL
jdbc_properties = {
“user”: “postgresuser”,
“password”: “adminpwrd”,
“driver”: “org.postgresql.Driver” # For PostgreSQL
}