Open fhrzn opened 1 year ago
For manual workaround just insert url as jdbc expected format.
jdbc:postgresql://example.com:1521/db
Example in sqlalchemy:
engine = create_engine(f'jdbcapi+pgjdbc://{uname}:{pwd}@{host}:{port}/{dbname}')
@henrykp If your "uname" or "pwd" contains special characters, use urllib quote like this:
from urllib.parse import quote
uname=quote("Amy#clusterid")
pwd=quote("secert@123")
Describe the bug In the
pgjdbc.py
there is a logic to parse sqlalchemy generated url to the one expected by jdbc. In the current implementation it causing thejava.net.java.net.UnknownHostException
error.To Reproduce Steps to reproduce the behavior:
Expected behavior The expected behavior should be connected successfully to the database.
Screenshots
Desktop (please complete the following information):
Additional context Add any other context about the problem here.