Reference

Datasources and credentials

Connection kinds, credential identity and revisions, connection tests, and datasource limits.

A datasource names a connection within a workspace. Each credential holds one database identity and its complete connection configuration. A datasource can have several credentials of the same backend kind.

For the setup procedure, use Connect a datasource. The catalog, joins and business knowledge are covered in Context.

Datasource identity

FieldMeaning
idDatasource record identity. Recreating a deleted datasource creates a new identity.
slugWorkspace-unique identifier used to select the datasource. It stays fixed when editing the connection or display name.
nameOptional display name. Changing it does not replace credentials.
kindBackend type, such as postgres or bigquery. A replacement credential must keep this kind.
configuredAt least one credential exists. This does not establish connectivity or permission to query.
revisionDatasource metadata revision, separate from each credential's revision.

A datasource can exist without a credential. Reading its metadata does not test the connection.

Connection kinds and fields

Every connection object includes kind. The table gives the other required fields and optional fields with their defaults. All 13 kinds also accept embedded, which defaults to false. For provider setup steps, use the connection guides.

Provider and kindRequired fieldsOptional fields
PostgreSQL, postgresconnection_stringschema
MySQL, mysql2connection_stringNone
SQL Server, mssqlauthentication, described belowNone
SAP HANA, hanaconnection_stringschema
BigQuery, bigqueryservice_account_key: service-account JSON object or JSON stringNone
Snowflake, snowflakeuser, warehouse, accountdatabase, database_schema
Redshift, redshifthost, database, username, passwordport = 5439, ssl = true, schema
ClickHouse, clickhousehost, user, passwordsecure = true, verify = true
DuckDB / MotherDuck, duckdbconnection_stringNone
Managed files, filesNonepath = files
Databricks, databrickshost, http_path, access_token, catalogschema
MongoDB Atlas SQL, mongodburi, database, user, passwordNone
SSH tunnel, sshhost, username, private_key, dst_addr, dst_port, db, described belowport = 22

Optional fields without a listed default are unset. Unknown fields are rejected. Connection strings and credential values are used literally; a value beginning with $ is not a reference to another stored secret.

SQL Server authentication

The authentication object supports two forms:

authentication.typeFields
connection_stringRequired: connection_string.
active_directory_service_principalRequired: server, database, client_id, tenant_id, client_secret. Optional: port = 1433.

Provider boundaries

  • SSH: db requires client, name, user and password; db_schema defaults to public. The gateway accepts PostgreSQL (postgres) and MySQL (mysql or mysql2) clients. SSH currently uses a Querio-managed key. Although the connection schema requires private_key, that field does not select an independent per-connection key.
  • Snowflake: authentication uses a Querio-managed key pair. An independent private key per credential is not configurable.
  • MongoDB: this connection uses MongoDB Atlas SQL through its ODBC driver. It is not a general MongoDB wire-protocol connection.
  • DuckDB: in-memory and MotherDuck connections are accepted. Local .duckdb database files are rejected; use managed files for uploaded tables.
  • Managed files: path is a directory beneath the configured context root, defaulting to files. It must stay inside that root. The engine exposes Parquet files in that directory as tables named after the files. It does not treat arbitrary workspace files as tables.

Credential identity and replacement

Credential reads return only ID, name, revision, Default status and timestamps. They never return connection values, passwords, tokens or keys. The connection form cannot refill saved values, so a replacement must supply the complete configuration, including unchanged secrets. A password-only patch will not work.

Replacement keeps the credential ID and its assignments, and advances its revision. API replacement and deletion require the current expectedRevision (an integer of at least 1). A stale revision returns 409; reload credential metadata before retrying.

The first credential on a newly configured datasource is initially assigned to Everyone. Later credentials need explicit assignments. Check the effective assignments before adding another credential for the same people.

Default is the stable credential targeted by the older single-connection editing form. Renaming it does not change its identity or Default status. Neither Default nor the credential name selects the identity used for queries.

Query selection

To query, a person needs datasource permission and exactly one distinct authorized credential for that datasource. Admins need both too; management permission does not grant credential use. Several assignments to the same credential still count as one.

Authorized credentialsResult
None403: no authorized credential.
Exactly oneUse that credential.
More than one distinct credential409: ambiguous credentials; no credential is chosen.

Missing datasource permission returns 403 before credential selection. Introspection uses the same authorized credential. See Users, roles and groups for grant paths, denials and exact errors.

New Explore selection

New Explore starts with a person's saved default datasources that are still visible to them. If none remain visible, it selects the first visible datasource; if none are visible, it selects nothing. Use Select datasource to check or change the selection before asking a question.

This selection does not grant query access or choose a credential. There is currently no Favorite datasources setting in the app to change saved defaults. See Ask and refine a question for the selection task.

Connection tests and introspection

CheckWhat it establishes
Test supplied connection detailsOpens a connection and pings it without saving those details. It does not test a user's saved credential assignments.
Save through the connection formTests the supplied complete configuration before saving. A failed test does not save the replacement.
Test a saved datasourceResolves the caller's credential and pings that connection.
IntrospectReads schema, table and column metadata visible to the selected database identity.
Run a query as the intended userExercises that user's datasource access, credential selection and the requested database operation.

The API's testConnection option defaults to false. Creating a datasource through the API without a test does not establish that it works. Test responses give success or failure and elapsed time, without returning the supplied configuration or native driver error details.

A successful ping does not establish table access or query success. Check the expected schemas and tables after introspection: one schema can succeed while another fails. Then run a small query as the intended user to check the actual database privileges.

Limits and deletion

ItemLimit or behavior
Slug1-120 ASCII characters. Starts with a letter or digit; remaining characters may also include ., _ or -.
Display nameOptional; when present, 1-120 characters after trimming.
Credential nameRequired; 1-120 characters after trimming, unique within the datasource.
Complete connectionAt most 1 MiB of JSON encoded as UTF-8. Must match the datasource kind.
Delete credentialRequires its current revision. Removes that credential and its use assignments; keeps the datasource and its datasource permissions.
Delete Default credentialBlocked while other credentials remain: The default credential cannot be deleted while other credentials exist.
Delete datasourceRemoves the datasource, its credentials and associated access assignments. Keeps catalogs and workspace files.

Deleting a datasource does not delete the upstream database. Existing Explores that depend on it can no longer query through that connection. Catalog and workspace files remain, but recreating the datasource requires a new connection setup and access check.

Was this page helpful?

Last updated on October 27, 2026

On this page