So i have a YAML file with the following parameters which I read into a dictionary
The part i don’t get is how to connect it to the SQL engine, I have looked at the documentation and what i need is to break the creds as
dialect+driver://username:password@host:port/database
but i’m not sure what the dialect and drive is in this case
RDS_HOST: XXXX.YYYYY.eu-west-1.rds.amazonaws.com
RDS_PASSWORD: XXXXXX
RDS_USER: XXXXXX
RDS_DATABASE: postgres
RDS_PORT: XXXX
2
Answers
You can try this.
I’m not sure if this is what you are looking for.
The dialect can either be
mysql
or any relational database management system it supports.For
mysql
the driver ismysqldb
.For
postgresql
the driver ispsycopg2
.Note: You may need to install the driver too