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 inStart here
A database or warehouseConnect a database below, then the page for your database
CSV, Parquet or JSON files in S3, GCS, Azure or an S3-compatible storeFiles in Cloud Storage
CSV, TSV, Parquet, JSON or Excel (.xlsx) files on your computerUpload a File
Files you want to ship inside a packageEmbedded 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

  1. Open your organization at https://your-org.app.credibledata.com
  2. Select your environment from the left sidebar
  3. Click "Add Connection" in the environment's Connections list
  4. In the Connect your database dialog, choose a Database Type, enter a Connection Name, and fill in the fields for that type
  5. Click "Test Connection" to check that Credible can reach the database with those credentials
  6. 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:

TypeWhat you needPage
PostgreSQLHost, port, database, username, password, or a connection stringPostgreSQL
BigQueryA service account JSON keyBigQuery
SnowflakeAccount, username, warehouse, and a password or a private keySnowflake
DatabricksWorkspace host, SQL warehouse HTTP path, catalog, and a personal access token or OAuth service principalDatabricks
TrinoServer URL and username, plus a password or a Peaka API keyTrino
MySQLHost, port, database, username, passwordMySQL
SQL ServerServer, port or instance name, database, username, passwordSQL Server
DuckDBAt least one attached database or bucket: PostgreSQL, BigQuery, Snowflake, S3, GCS or AzureDuckDB
MotherDuckAn access tokenMotherDuck
DuckLakeA PostgreSQL catalog and S3 or GCS storageDuckLake

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.json

The 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.

Next Steps

On this page