Database credentials
Using Cube Cloud or your own Cube Core deployment instead of Embeddable's built-in Cube? See Bring your own Cube — this page does not apply to you.
Under the hood, Embeddable relies on an open-source library called Cube (opens in a new tab) to connect to your database.
Below are the type and credentials fields you’ll need when connecting your database. You can also set an optional concurrency field on the connection itself (alongside type and credentials, not inside it) to control how many connections Cube opens to your database.
Athena
Cube docs (opens in a new tab)
type: 'athena',
credentials: {
accessKeyId: '...',
secretAccessKey: '...',
region: '...',
// S3OutputLocation: '...',
// workGroup: '...',
// catalog: '...',
// schema: '...',
}BigQuery
Cube docs (opens in a new tab)
type: 'bigquery',
credentials: {
projectId: '...',
credentials: { // content of service-account.json
"type": "service_account",
"project_id": "...",
// etc.
}
}Clickhouse
Cube docs (opens in a new tab)
type: 'clickhouse',
credentials: {
database: '...',
host: '...',
protocol: 'http:',
username: '...',
password: '...',
port: 8443
}Databricks
Cube docs (opens in a new tab)
type: 'databricks-jdbc',
credentials: {
url: '...',
token: '...',
}Druid
Cube docs (opens in a new tab)
type: 'druid',
credentials: {
url: '...',
user: '...',
password: '...',
// database: '...'
}
Elasticsearch
Cube docs (opens in a new tab)
type: 'elasticsearch',
credentials: {
url: '...',
// queryFormat: '...',
// openDistro: '...',
// ssl: '...',
}MotherDuck
Cube docs (opens in a new tab)
type: 'duckdb',
credentials: {
motherDuckToken: '...'
}MS SQL / SQL Server
Cube docs (opens in a new tab)
type: 'mssql',
credentials: {
server: '...',
port: 1433,
user: '...',
password: '...',
database: '...',
options: {
// trustServerCertificate: true
}
}MS Azure Fabric / SQL Server
Cube docs (opens in a new tab)
{
"type": "msfabric",
"credentials": {
"server": "...",
"database": "...",
"tenantId": "...",
"authType": "...", // ActiveDirectoryPassword or ActiveDirectoryServicePrincipal
"username": "...",
"password": "...",
"clientId": "..."
}
}MySQL / MariaDB
Cube docs (opens in a new tab)
type: 'mysql',
credentials: {
database: '...',
host: '...',
user: '...',
password: '...',
port: 3306,
ssl: true
}Postgres
Cube docs (opens in a new tab)
type: 'postgres',
credentials: {
database: '...',
host: '...',
user: '...',
password: '...',
port: 5432,
ssl: true // or { rejectUnauthorized: false }
}Redshift
Cube docs (opens in a new tab)
type: 'redshift',
credentials: {
database: '...',
host: '...',
user: '...',
password: '...',
port: 5439,
ssl: true
}Snowflake
Cube docs (opens in a new tab)
type: 'snowflake',
credentials: {
account: '...',
warehouse: '...',
database: '...',
username: '...',
"authenticator": "SNOWFLAKE_JWT",
"privateKey": "-----BEGIN PRIVATE KEY-----\n........\n-----END PRIVATE KEY-----"
// password: '...',
// role: '...',
// region: '...',
}To generate a private key:
openssl genrsa 2048 | openssl pkcs8 -topk8 -inform PEM -out rsa_key.p8 -nocryptTo extract the public key:
openssl rsa -in rsa_key.p8 -pubout -out rsa_key.pubTrino
Cube docs (opens in a new tab)
type: 'trino',
credentials: {
host: "...",
port: "...",
catalog: "...",
schema: "...",
user: "...",
basic_auth: {
user: "...",
password: "..."
},
ssl: {}
}More databases
For the full list of supported databases, click here (opens in a new tab).