Connect Data
Connect Credible to your databases, files in cloud storage, or files you upload, in the Credible App or from the CLI, and choose which tables the agent can search
Credible reads your data where it already lives: in a database or warehouse, in files in cloud storage, or in files you upload. You don't need a warehouse to start.
| Your data is in | Start here |
|---|---|
| A database or warehouse | Connect a database below, then the page for your database |
| CSV, Parquet or JSON files in S3, GCS, Azure or an S3-compatible store | Files in Cloud Storage |
CSV, TSV, Parquet, JSON or Excel (.xlsx) files on your computer | Upload a File |
| Files you want to ship inside a package | Embedded Data |
Connect a Database
A connection is a secure, managed link to a database or warehouse. Connections are stored in a Credible environment, and every package in that environment can use them. Credentials never leave Credible, and all access, for modeling and for serving, goes through Credible.
Prerequisites
- Admin access to an organization, in order to create environments and connections. When you create your own organization you're its admin; if you've been added to an existing one, ask your organization administrator to set connections up for you.
- Credentials for the database, and network access from Credible to it. See Connection Settings for network access.
In the Credible App
- Open your organization at
https://your-org.app.credibledata.com - Select your environment from the left sidebar
- Click "Add Connection" in the environment's Connections list
- In the Connect your database dialog, choose a Database Type, enter a Connection Name, and fill in the fields for that type
- Click "Test Connection" to check that Credible can reach the database with those credentials
- Click "Connect" to save it
Connection names can contain only letters, numbers and underscores, and must
start with a letter or an underscore (e.g., my_connection).
The fields for each type, how to create the credentials, and the errors you are most likely to see:
| Type | What you need | Page |
|---|---|---|
| PostgreSQL | Host, port, database, username, password, or a connection string | PostgreSQL |
| BigQuery | A service account JSON key | BigQuery |
| Snowflake | Account, username, warehouse, and a password or a private key | Snowflake |
| Databricks | Workspace host, SQL warehouse HTTP path, catalog, and a personal access token or OAuth service principal | Databricks |
| Trino | Server URL and username, plus a password or a Peaka API key | Trino |
| MySQL | Host, port, database, username, password | MySQL |
| SQL Server | Server, port or instance name, database, username, password | SQL Server |
| DuckDB | At least one attached database or bucket: PostgreSQL, BigQuery, Snowflake, S3, GCS or Azure | DuckDB |
| MotherDuck | An access token | MotherDuck |
| DuckLake | A PostgreSQL catalog and S3 or GCS storage | DuckLake |
For IP allowlists, private networks, encryption and timeouts, see Connection Settings.
Choose Searchable Tables
After you connect, Credible opens the connection's page, where you choose which tables the agent can search. Credible indexes the names and column names of those tables, not their rows, so the agent can find them while you build models without querying your database each time. Every table stays queryable either way.
- Pick schemas and tables in the tree. A whole schema can be chosen at once
- Click Make … searchable to save the choice. To skip it, clear the selection and choose Finish setup with no searchable tables
- A table tagged Selected is still being indexed. One tagged Searchable is ready for the agent
You can change the choice later from the same page. To change credentials, re-index or delete the connection, click Manage on the connection's page.
Connect from the CLI
The cred CLI creates connections from a JSON file, which suits scripts and setting up several connections at a time. Install it and sign in first; see Install and Sign In and Session in the CLI reference. Connections go into the CLI's current environment, which cred status shows.
Write the connection file
The file is a JSON array. Each entry has a name, a type (postgres, bigquery, snowflake, databricks, trino, mysql, sqlserver, duckdb, motherduck or ducklake) and an object named after the type, such as postgresConnection, that holds the database's settings:
[
{
"name": "warehouse",
"type": "postgres",
"postgresConnection": {
"host": "db.example.com",
"port": 5432,
"databaseName": "analytics",
"userName": "credible_readonly",
"password": "..."
}
}
]Each database's page has its entry under From the CLI. Keep the file out of version control: it holds credentials.
Add the connections
cred add connection connections.jsonThe CLI asks to confirm each connection; -y skips that. Credible tests each one before creating it, and refuses a connection that fails its test or whose name the environment already has. To change an existing connection, use cred update connection.
Choose searchable tables
Name the tables to make searchable with --include-tables, as {dataset/schema}.{table}, where * matches every table in a schema:
cred add connection connections.json --include-tables "sales.*,finance.orders"Without --include-tables, the connection is created with no searchable tables. Every table stays queryable, and you can choose searchable tables later on the connection's page in the Credible App (see Choose Searchable Tables).
If you already run a local Publisher, cred add connection --from-publisher-config copies its connections from publisher.config.json instead. See Bring Your Own Connections.