URI Connection Strings
- 18 Oct 2024
- 1 Minute to read
- Print
- DarkLight
URI Connection Strings
- Updated on 18 Oct 2024
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Connection Strings
Below is a list of connection strings for use when connecting a database using a SQLAlchemy URI.
Select linked database name for more connection details / instructions.
Database | Connection String |
---|---|
Amazon Athena | awsathena+pandas://<AWS Access Key ID>:<AWS Secret Access Key>@athena.<Region Name>.amazonaws.com/<Database Name>?s3_staging_dir=s3://<S3 Bucket>/&work_group=<Work Group> |
Amazon Redshift | redshift+psycopg2://<Username>:<Password>@<AWS Endpoint>:<Port(default:5439)>/<Database Name>?sslmode=verify-ca To support Spectrum tables, please use this alternative driver: redshift+spectrum://<Username>:<Password>@<AWS Endpoint>:<Port(default:5439)>/<Database Name>?sslmode=verify-ca |
Apache Drill | drill+sadrill://<Username>:<Password>@<Host>:<Port>/<Storage Plugin>?use_ssl=True |
Apache Druid | druid+https://<Username>:<password>@<Host>:<Port(default:8082)>/druid/v2/sql |
Apache Hive | hive://<Host>:<Port(default:10000)>/<Catalog>/<Schema> |
Apache Impala | impala://<Host>:<Port>/<Database Name>?use_ssl=True |
Apache Kylin | kylin://<Host>:<Port>/<Database Name>?is_ssl=True |
Apache Pinot | pinot+https://pinot-broker.<Host>:<Port>/query?server=https://pinot-controller.<Host>:<Port>/ |
Apache Spark SQL | jdbc+hive:// |
Aurora PostgreSQL (Data API) | postgresql+auroradataapi://<AWS Access ID>:<AWS Secret Key>@/<Database Name> |
Azure Synapse | mssql+pyodbc://<Username>:<Password>@<Host>:<Port>/<Database Name>?driver=ODBC+Driver+17+for+SQL+Server If you face an error, try including autocommit=True (might be required by your database):mssql+pyodbc://<Username>:<Password>@<Host>:<Port>/<Database Name>?autocommit=True&driver=ODBC+Driver+17+for+SQL+Server |
ClickHouse | clickhousedb+connect://<Username>:<Password>@<Host>/<Database Name>?secure=true |
CockroachDB | cockroachdb://<Username>:<Password>@<Host>/<Database Name>?sslmode=require |
Databricks Hive | databricks+pyhive://token:<Token>@<Host>:443 |
Dremio | dremio://<Username>:<Password>@<Host>:<Port>/<Database Name>/?SSL=1 To connect using a Personal Access Token (PAT): dremio://$token:<Personal Access Token>@sql.dremio.cloud:443/<Project ID>;SSL=1 |
Elasticsearch (SQL API) | elasticsearch+https://<Username>:<Password>@<Host>:<Port>/ |
Firebird | firebird+fdb://<Username>:<Password>@<Host>:<Port(default:3050)>/<Path to DB>/db.fdb |
Firebolt | firebolt://<Username>:<Password>@<Database Name>/<Engine Name>?account_name=<Account Name> To connect using a service account: firebolt://<Service Account ID>:<Service Account Secret>@<Database Name>/<Engine Name>?account_name=<Account Name> |
Google BigQuery | bigquery://<Project ID> |
Google Sheets | gsheets:// |
Hana | hana://<Host>?encrypt=True |
IBM Db2 | db2+ibm_db://<Username>:<Password>@<Host>:<Port>/<Database Name>?Security=SSL |
Microsoft SQL Server | mssql+pymssql://<Username>:<Password>@<Host>:<Port(default:1433)>/<Database Name> |
MySQL | mysql+mysqlconnector://<Username>:<Password>@<Host>/<Database Name> |
Oracle | oracle+oracledb://<User>:<password>@<TNSName> |
PostgreSQL | postgresql://<Username>:<Password>@<Host>/<Database Name>?sslmode=require |
Presto | presto://<Username>:<Password>@<Host>:<Port>/<Catalog>/<Schema>?protocol=https |
Rockset | rockset://apikey:<Your API Key>@api.<Rockset Region>.rockset.com |
Snowflake | snowflake://<Username>:<Password>@<Account>/<Database>?role=<Role>&warehouse=<Warehouse> |
Teradata | teradata:// |
Trino | trino://<Username>:<Password>@<Host>:<Port>/<Catalog> |
Vertica | vertica+vertica_python://<UserName>:<Password>@<Host>/<Database Name>?ssl=1 |
Was this article helpful?