URI Connection Strings
  • 03 Oct 2022
  • 1 Minute to read
  • Contributors
  • Dark
    Light

URI Connection Strings

  • Dark
    Light

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+rest://<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
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>/<Database Name>
Apache Impala impala://<Host>:<Port-default>/<Database Name>?use_ssl=True
Apache Kylin kylin://<Host>:<Port-default>/<Database Name>?is_ssl=True
Apache Pinot pinot+https://pinot-broker.<Host>:<Port-default>/query?server=https://pinot-controller.<Host>:<Port-default>/
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>/<DatabaseName>?driver=ODBC+Driver+17+for+SQL+Server
ClickHouse clickhouse+native://<Username>:<Password>@<Host>/<Database Name>?secure=true
CockroachDB cockroachdb://<Username>:<Password>@<Host>/<Database Name>?sslmode=require
Databricks Hive databricks+pyhive://token:<token>@<host>:443/<Database Name>
Dremio dremio://user:pwd@host:31010/<Database Name>/?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>@<Host>/<Database Name>
Google BigQuery bigquery://<Project ID>
Google Sheets gsheets://
Hana hana://<Host>?encrypt=True
IBM Db2 db2+ibm_db://<Host>/?Security=ssl
Microsoft SQL Server mssql+pymssql://<Username>:<Password>@<Host>:<Port-default:1433>/<Database Name>
MySQL mysql+mysqlconnector://<UserName>:<Password>@<Host>/<Database Name>
PostgreSQL postgresql://<UserName>:<Password>@<Host>/<Database Name>?sslmode=require
Presto presto://<UserName>:<Password>@<Host>/<Database Name>?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 trinonative://<Username>:<Password>@<Host>:<Port>/<Catalog>
Vertica vertica+vertica_python://<UserName>:<Password>@<Host>/<Database Name>?ssl=1

Was this article helpful?