URI Connection Strings
  • 08 Jul 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 End Point>:<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://<User>:<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}@/{db_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 elasticsearch+https://<Host>:9200/
Firebird firebird+fdb://<Username>:<Password>@<Host>:<Port-default:3050>/<path to db>/db.fdb
Firebolt firebolt://{username}:{password}@{host}/{database}
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-apikey}@api.{rockset-region}.rockset.com
Snowflake snowflake://<UserName>:<Password>@<Account>/<Database>?role=<Role>&warehouse=<Warehouse>
Teradata teradata://
Trino trinonative://{username}:{password}@{hostname}:{port}/{catalog}
Vertica vertica+vertica_python://<UserName>:<Password>@<Host>/<Database Name>?ssl=1

Was this article helpful?