Hi there,

It could be a non-sense question for you but for I've struggling on this 
for weeks and search result from google cannot help so I'm end up here.

Normally I've use SQL client program as SQLwokbench/J and it's using JDBC 
connection below to connect 3 databases 1 Presto, 2 Redshift.

jdbc:presto://bdp-e2e-presto.xxx.com:xxxx/hive?user=x...@xxxx.com&SSL=true&SSLTrustStorePath=C:/Users/Downloads/bdp-ts.jks

jdbc:redshift://xxx-edm-oregon-prod02.cgdmyxu24bfx.us-west-2.redshift.amazonaws.com:xxxx/bdpdw?tcpKeepAlive=true&ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory

jdbc:redshift:iam://bdp-dp-redshift-hdd01:us-west-2/drive?tcpKeepAlive=true&ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory&plugin_name=com.amazon.redshift.plugin.AdfsCredentialsProvider&idp_host=access.xxxx.com&idp_port=xxx&DbGroups=grp_hdd_r&preferred_role=arn:aws:iam::xxxxxxxxxxxx:role/AWS-BDP-ENG-REDSHIFT-HDD-Prod

Couple weeks ago I'm try to use sqlalchemy to connect to those databases. 
But I don't know how can I fit the above information into standard form of 
sqlalchemy like

dialect+driver://username:password@host:port/database

I'm trying this 

create_engine('jdbc:postgres:redshift://hgst-edm-oregon-prod02.cgdmyxu24bfx.us-west-2.redshift.amazonaws.com:xxxx/bdpdw?tcpKeepAlive=true&ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory/vqaa')

and error message came up like this.

ArgumentError: Could not parse rfc1738 URL from string 
'jdbc:postgres:redshift://hgst-edm-oregon-prod02.cgdmyxu24bfx.us-west-2.redshift.amazonaws.com:xxxx/bdpdw?tcpKeepAlive=true&ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory/vqaa'


Please kindly advise. 

thank you.

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/dcc979fd-ea9c-48ed-9cc2-ad96ce906bf8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to