> ## Documentation Index
> Fetch the complete documentation index at: https://docs.meetsilicon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect your warehouse and project

> Connect your warehouse and choose a dbt or native Silicon YAML project

To setup your Silicon connection you'll need to:

1. [Connect to your data warehouse](https://docs.meetsilicon.com/integrations/connect-project.md#1-connect-to-a-warehouse)
2. Connect a [dbt project](#2-import-a-dbt-project) or [native Silicon YAML project](https://docs.meetsilicon.com/semantic-layer/yaml.md#connect-through-github)

> [!TIP]
>
> You can see a list of every time your project is compiled by visiting the [project compilation history](https://docs.meetsilicon.com/workspace-admin/project-compilation-history.md) page.

## Open up your Silicon instance to get started.

**To update an existing connection**, go to **Project settings** by clicking on the gear icon in the top-right navigation.

**To create a new project**, go to **Organization settings**, then **All projects** and click **Create new**.

## 1. Connect to a warehouse

We currently support [BigQuery](#bigquery), [Postgres](#postgres), [Supabase](#supabase), [Redshift](#redshift), [Snowflake](#snowflake), [Databricks](#databricks), [Trino](#trino), [ClickHouse](#clickhouse), [DuckDB](#duckdb), and [Athena](#athena). If your warehouse isn't listed, you may still be able to connect to it through [Trino](#trino).

We always recommend giving read-only permissions to Silicon, that way you ensure than no data can be manipulated. See each section below for warehouse specific details.

A Postgres, Athena or Snowflake project can also query more than one warehouse. See [multiple warehouse connections](https://docs.meetsilicon.com/workspace-admin/multiple-warehouse-connections.md).

> [accordion] Connect to your warehouse without a dbt project (warehouse-first onboarding)
>
> When the `new-onboarding` feature flag is enabled, the **Create new project** screen shows a **Connect to your warehouse** option alongside the standard "Connect via CLI" and "Connect manually" flows.
>
> Choosing it takes you directly to the warehouse connection form and creates the project with dbt type `NONE` -- no dbt project is imported and no dbt compilation runs. Explores are populated directly from the warehouse catalog instead of dbt models, so this is a good fit if you want to start exploring your data before you have a dbt project set up. You can add or switch to a dbt project later from **Project settings**.
>
> Combine this with **Connect via Silicon CLI (SSO)** on Snowflake or **Sign in with Google** on BigQuery (see below) to create a project without ever pasting a credential -- the same feature flag also enables smart defaults (recommended project, largest dataset/database, recommended warehouse) after you authenticate.

> [accordion] Adding Silicon's static IP addresses to your allow-list
>
> Since we host your Silicon for you, you may need to add our static IP addresses to the allow-list for your security group or firewall rules so they don't block calls from Silicon to your connected databases.
>
> If you login at:
>
> * **app.meetsilicon.com** use **35.245.81.252**
> * **eu1.meetsilicon.com** use **34.38.17.228**
>
> If you login at a different domain, look for the IP in the project settings page (see image below).

### Choose how to connect your warehouse

Choose your authentication method before you connect. You can connect Silicon to your warehouse with your user account or with a service account:

* **Your user account.** Depending on the warehouse, you sign in with SSO (for example **Sign in with Google**, **Sign in with Snowflake**, or **Connect via Silicon CLI (SSO)**) or with your personal username and password. This is quick for testing, but Silicon runs every query as you.
* **A service account.** Silicon connects with a dedicated identity, for example using a JSON key file, private key, password, or PAT. This is the recommended option for production.

The available options depend on the warehouse. You pick one in the **Authentication type** dropdown of the warehouse connection form, and each warehouse section below lists what it supports.

> [!WARNING]
>
> **If you connect with your user account, Silicon uses your personal credentials for everyone.** Silicon runs all project operations with your credentials: other users' queries, scheduled deliveries, and everything else. Every query appears under your name in warehouse logs, and every user can query anything you can. If your token expires, your access is revoked, or you leave the company, the project stops working.

For production, create a dedicated service account with read-only permissions. To have each user query with their own identity instead, require [personal warehouse credentials](https://docs.meetsilicon.com/personal-settings/personal-warehouse-connections.md).

### Bigquery

##### Project

This is project ID from Google Cloud Platform for the data that you want to connect Silicon to.

To find your project ID, head to the [BigQuery Cloud console](https://console.cloud.google.com/).

Once you're in there, click on the project name in the top bar.

Then, you should see all of the projects and their project IDs in your organization (that you have access to).

For the project you want to connect Silicon to, just copy its `id` and pop it into the `project` field in the Warehouse Connection form in Silicon.

##### Authentication type

You can choose to connect to BigQuery with a user account (using "Sign in with Google") or with a service account using a JSON key file.

To let AI agents run as a separate service account, see [BigQuery: the shared agent account](https://docs.meetsilicon.com/agents/agent-identity.md#bigquery-the-shared-agent-account).

##### User Account (Sign in with Google)

When you use "Sign in with Google" - Silicon will execute queries against bigquery with your personal google user account. This is the simplest way to get connected quickly using your existing account.

> [!NOTE]
>
> When the `new-onboarding` feature flag is enabled, new BigQuery projects default to **Sign in with Google** and the setup wizard suggests smart defaults after you authenticate: a recommended **Project ID** based on your Google account's BigQuery activity, and the largest available **Dataset** (marked with a *Recommended - largest* badge in the picker). You can override either at any time.

> [accordion] BigQuery tokens expiring
>
> If your Google Workspace uses [Google Cloud session control](https://support.google.com/a/answer/9368756), users are asked to reconnect their Google account every session (16 hours by default). When the session ends, queries fail with this error:
>
> ```text theme={null}
> Google rejected the BigQuery refresh token (invalid_grant: ...; invalid_rapt). Reconnect your BigQuery account in personal settings.
> ```
>
> An admin can change this for Silicon in one of two ways.
>
> **Set a session length for Silicon only (recommended)**
>
> A Google Cloud admin can set a per-app session length with [Access Context Manager](https://docs.cloud.google.com/access-context-manager/docs/session-controls-for-reauthentication). This doesn't trust Silicon or affect other apps. It applies to members of a Google Group, so add your Silicon users to one first.
>
> Create a binding file that targets the Silicon OAuth client. Set `sessionLength` to between `3600s` and `86400s`, or to `0s` with `sessionLengthEnabled: false` to exempt Silicon from session control:
>
> ```yaml theme={null}
> scopedAccessSettings:
>   - scope:
>       clientScope:
>         restrictedClientApplication:
>           clientId: 550976420660-kr9mochv2btveg9sr7rpeqe08mo2hvk5.apps.googleusercontent.com
>     activeSettings:
>       sessionSettings:
>         sessionLength: 86400s
>         sessionReauthMethod: LOGIN
>         sessionLengthEnabled: true
> ```
>
> Then bind it to the group:
>
> ```bash theme={null}
> gcloud access-context-manager cloud-bindings create \
>   --organization=ORG_ID \
>   --group-key=GROUP_ID \
>   --binding-file=silicon-session.yaml
> ```
>
> `GROUP_ID` is the group's ID, not its email address. `gcloud identity groups describe GROUP_EMAIL --format="value(name)"` returns it as `groups/GROUP_ID`.
>
> This binding overrides the Admin console session setting for members of the group and isn't shown in the Admin console. If your organization already has Access Context Manager bindings for the same group, only the most recently created one applies, so add the Silicon scope to that binding instead.
>
> **Trust Silicon (simpler)**
>
> A Google Workspace admin can mark the Silicon OAuth app as **Trusted** under **Security -> API controls -> Manage Third-Party App Access**, then select **Exempt trusted apps** under **Google Cloud session control** (this applies to all trusted apps, not just Silicon). Marking an app as **Trusted** also allows it any Google scope it requests without admin approval. [See more](https://knowledge.workspace.google.com/admin/apps/control-which-apps-access-google-workspace-data).

##### Service account (JSON Key File)

To have Silicon connect to BigQuery with a service account, you need to create the account and JSON key. You can read more about [creating and managing service accounts with Google BigQuery in their docs](https://cloud.google.com/iam/docs/creating-managing-service-accounts). You will need permissions to create service accounts and keys in your Google Project. If you don't have the permissions, use your user account instead.

> [!NOTE]
>
> If you're creating a new service account, make sure that you save your JSON key file somewhere safe! You'll need it for connecting to Silicon.

The service account you use with Silicon will need to have the following roles in your GCP project:

* `roles/bigquery.dataViewer` (to see data in your project)

* `roles/bigquery.jobUser` (to run queries in your project)

If you need to provide access to data across multiple BigQuery projects, the service account will need to be granted `roles/bigquery.dataViewer` on each additional BigQuery project.

Once you have a service account all ready to go, you'll need to add its JSON key file to Silicon in the `key file` section of the Warehouse Connection page.

##### Location

The data location of the dataset in BigQuery where the output of your dbt models is written to.

`location` may be either a multi-regional location (e.g. `EU`, `US`), or a regional location (e.g. `us-west2` ). Check out the [BigQuery documentation](https://cloud.google.com/bigquery/docs/locations) for more information on dataset locations.

You can find the location of the dataset you're using for your dbt project [in your dbt profiles.yml file](https://docs.getdbt.com/reference/warehouse-profiles/bigquery-profile#dataset-locations), or in your BigQuery console.

##### Timeout in seconds

BigQuery supports query timeouts. By default, the timeout is set to 300 seconds. If a query run by Silicon takes longer than this timeout to complete, then BigQuery may cancel the query and issue the following error:

```bash theme={null}
Operation did not complete within the designated timeout.
```

To change this timeout, use the `Timeout in seconds` configuration.

##### Priority

The priority for the BigQuery jobs that Silicon executes can be configured with the `priority` configuration in your Warehouse Connection settings. The `priority` field can be set to one of `batch` or `interactive`.

For more information on query priority, [check out the BigQuery documentation.](https://cloud.google.com/bigquery/docs/running-queries)

##### Retries

The `retries` configuration specifies the number of times Silicon should retry queries that result in unhandled server errors.

For example, setting `retries` to 5 means that Silicon will retry BigQuery queries 5 times with a delay. If the query does not succeed after the fifth attempt, then Silicon will raise an error.

By default, the number of retries is set to 3.

##### Maximum bytes billed

If a value for the `Maximum bytes billed` is set, then queries executed by Silicon will fail if they exceed the configured maximum bytes threshhold. This configuration should be supplied as an integer number of bytes.

For example, setting this to `1000000000` means if a query would bill more than a gigabyte of data (e.g. 2Gb), then BigQuery will reject the query and you'd get an error like this:

```bash theme={null}
  Query exceeded limit for bytes billed: 1000000000. 2000000000 or higher required.
```

Leaving this field empty or setting it to `0` means no limit.

###### Maximum bytes billed by role

A limit that suits people who view dashboards can be too tight for people who write SQL. Under **Maximum bytes billed by role**, you can set a different limit for each project role: **Viewer**, **Interactive Viewer**, **Editor**, **Developer** and **Admin**. You'll find these fields in the advanced options of the BigQuery connection, after **Maximum bytes billed**.

Silicon uses the person's highest project role. That role can come from their organization role, their project access or a group they belong to. For example, a person who is an organization **Viewer** but a **Developer** on the project through a group gets the **Developer** limit.

* Leave a role empty to use the connection's **Maximum bytes billed** for that role.
* Set a role to `0` to remove the limit for that role.
* People whose access comes only from a [custom role](https://docs.meetsilicon.com/workspace-admin/custom-roles.md) get the connection's **Maximum bytes billed**.

###### AI agent maximum bytes billed

**AI agent maximum bytes billed** sets a separate limit for queries that AI agents run. This includes agents in Silicon and Slack, MCP clients and the [shared agent account](https://docs.meetsilicon.com/agents/agent-identity.md#bigquery-the-shared-agent-account). Leave it empty to use the role limit of the person the agent is working for, or the connection's limit if their role has none. Set it to `0` to remove the limit for agent queries.

###### Which limit applies

Silicon picks one limit for each query and sends it with that query to BigQuery:

1. For an agent query, the **AI agent maximum bytes billed**, if it's set.
2. Otherwise, the limit for the person's highest project role, if it's set.
3. Otherwise, the connection's **Maximum bytes billed**.

The role and agent limits replace the connection's limit. They don't add to it, so a role limit can be higher or lower than the connection's limit. They apply to queries from charts, dashboards, the SQL runner, scheduled deliveries and agents. dbt runs and compiling the project use the connection's **Maximum bytes billed**.

###### When a query hits the limit

BigQuery rejects the query before it runs, so nothing is billed. The chart, dashboard tile or SQL runner shows an error with the limit and the number of bytes the query needs:

```bash theme={null}
  Bigquery warehouse error: bytesBilledLimitExceeded - Query exceeded limit for bytes billed: 1000000000. 2000000000 or higher required.
```

To get the query under the limit, add filters, choose fewer fields or use a shorter date range. To raise the limit, ask a project admin to change it for your role.

When an agent's query hits the limit, the agent gets the same error. It may try a narrower query. If its queries keep failing, it stops querying and answers with what it has, telling you that the query failed.

##### Query cost estimates

Silicon can estimate how much data a query will process before it runs, using a free [BigQuery dry run](https://cloud.google.com/bigquery/docs/running-queries#dry-run). All three settings are in the advanced options of the BigQuery connection and are off until you set them.

`Maximum bytes billed`, and the role and AI agent limits above, are enforced by BigQuery itself, so they stay the hard limit for every query, including AI agent queries. Keep them set when you use query cost estimates: estimates can be lower than the bytes a query is billed for.

| Setting | What it does |
| - | - |
| `Show query cost estimates` | Shows the estimated bytes processed next to **Run query** in the Explore view and next to **Run** in the SQL Runner. |
| `Confirm queries estimated above (bytes)` | Asks users to confirm before running a query whose estimate is above this number of bytes. Requires `Show query cost estimates`. Leave it empty to never ask. |
| `AI agent query limit (estimated bytes)` | Refuses AI agent queries whose estimate is above this number of bytes. Leave it empty for no limit. |

**Estimate and confirm for users.** With estimates on, the estimate updates as you change the query, before you run it. If you run a query estimated above the confirmation threshold, a dialog shows the estimate and the threshold, and the query only runs once you confirm. If an estimate can't be calculated, the query runs as normal.

**Enforced limit for AI agents.** Every query an AI agent runs, in Silicon or through [MCP](https://docs.meetsilicon.com/agents/silicon-mcp.md), is dry-run before it executes. If the estimate is above the agent limit, the query is not run and the agent receives an error with the estimate and the limit, so it can narrow the query (filter on a partition column, shorten the date range, or select fewer columns) and try again. Silicon checks the limit on every agent query; it does not depend on the agent's instructions. This limit is separate from **AI agent maximum bytes billed**: the estimate limit stops the query before it reaches BigQuery, and the bytes-billed limit is enforced by BigQuery on the query itself.

> [!WARNING]
>
> Dry-run estimates can be lower than what a query is billed for: tables with row-level security report 0 bytes, and external tables can report less than they scan. Keep `Maximum bytes billed` (or the role and AI agent limits) set as the hard limit.

The confirmation threshold and the agent limit are integer numbers of bytes, for example `10000000000` for 10 GB. Estimates are bytes processed. On-demand pricing bills bytes processed but rounds each referenced table up to at least 10 MB, so a very small query can be billed more than its estimate. With capacity (slot-based) pricing, estimates show scan size, not cost.

##### Start of week

This controls what day is the start of the week in Silicon. `Auto` sets it to whatever the default is for your data warehouse. Or, you can customize it and select the day of the week from the drop-down menu. This will be taken into account when using 'WEEK' time interval in Silicon.

##### Execution project

Here you can specify an execution project to bill for query execution, instead of using the project where your dbt resources are materialized. If you leave this blank, all costs get applied to the project from the top of the connection details.

***

### Postgres

You can see more details in [dbt documentation](https://docs.getdbt.com/reference/warehouse-profiles/postgres-profile).

> [!TIP]
>
> **Using Supabase?** Supabase runs on Postgres, so pick **Postgres** as your warehouse and use your Supabase connection details. See the [Supabase setup guide below](#supabase) for step-by-step instructions, including a quickstart repo that wires up the CLI and AI-generated models for you.

##### Host

This is the host where the database is running.

##### User

This is the database user name.

##### Password

This is the database user password.

##### DB name

This is the database name.

##### Schema

This is the default schema used by dbt to compile and run your dbt project. You can find this in the dbt cloud IDE or your local `profiles.yml` file.

If you're a dbt cloud user you can find this under your profile in the dbt cloud IDE:

If you work with dbt locally, then check your `profiles.yml` file at `~/.dbt/profiles.yml` and look for a field named `schema`:

```yaml theme={null}
company-name:
  target: dev
  outputs:
    dev:
      type: postgres
      host: [hostname]
      user: [username]
      password: [password]
      port: [port]
      dbname: [database name]
      schema: [dbt schema] # look for this one!
```

##### Port

This is the port where the database is running.

##### Keep alive idle (seconds)

This specifies the amount of seconds with no network activity after which the operating system should send a TCP keepalive message to the client. You can see more details in [postgresqlco documentation](https://postgresqlco.nf/doc/en/param/tcp%5Fkeepalives%5Fidle/).

##### Search path

This controls the Postgres "search path". You can see more details in [dbt documentation](https://docs.getdbt.com/reference/warehouse-profiles/postgres-profile#search%5Fpath).

##### SSL mode

This controls how dbt connects to Postgres databases using SSL. You can see more details in [dbt documentation](https://docs.getdbt.com/reference/warehouse-profiles/postgres-profile#sslmode).

##### SSL certificate

The client certificate used to authenticate your connection to the database. This is only required if you're using SSL mode `verify-full`.

##### SSL private key

The private key used to authenticate your connection to the database. This is only required if you're using SSL mode `verify-full`.

##### SSL root certificate

The trusted certificate authority (CA) certificate used to verify the database server's identity. This is only required if you're using SSL mode `verify-ca` or `verify-full`.

##### Start of week

This controls what day is the start of the week in Silicon. `Auto` sets it to whatever the default is for your data warehouse. Or, you can customize it and select the day of the week from the drop-down menu. This will be taken into account when using 'WEEK' time interval in Silicon.

##### Use SSH tunnel

Enable to input your **SSH Remote Host**, **SSH Remote Port**, **SSH Username**, and to generate a public SSH key. Use this when your Postgres database is in a private VPC and cannot be reached directly from Silicon. See [Connect through an SSH tunnel](https://docs.meetsilicon.com/integrations/connect-through-ssh-tunnel.md) for the full setup.

***

### Supabase

[Supabase](https://supabase.com) is a managed Postgres database, so Silicon connects to it using the **Postgres** warehouse type -- there's no separate Supabase connector to pick. The fields below are the same Postgres fields documented above; this section just maps them to the values Supabase exposes.

> [!TIP]
>
> Prefer a hands-on walkthrough? The [`silicon/silicon-supabase-quickstart`](https://github.com/meetsilicon/silicon-supabase-quickstart) repo gets you from zero to charts on your Supabase data in about 15 minutes, with no dbt project required. It includes setup scripts for macOS/Linux and Windows, a preconfigured [Supabase MCP](https://supabase.com/docs/guides/getting-started/mcp) so your AI agent (Cursor or Claude Code) can generate Silicon models from your schema, and a `set-warehouse` script that wires up your warehouse credentials via the API.

#### Get your Supabase connection details

In the Supabase dashboard, open your project and go to **Connect -> Session Pooler -> View parameters**. Use the **Session pooler** (not the direct connection or transaction pooler) -- it accepts long-running queries and is the right fit for Silicon.

Map the Supabase parameters to the Silicon Postgres connection form:

| Silicon field | Supabase value |
| :- | :- |
| **Host** | Pooler host (e.g. `aws-0-<region>.pooler.supabase.com`) |
| **Port** | `5432` (session pooler) |
| **User** | `postgres.<your-project-ref>` |
| **Password** | Your database password (set when you created the project; you can reset it under **Database -> Settings**) |
| **DB name** | `postgres` |
| **Schema** | The schema your models live in -- typically `public` |
| **SSL mode** | `require` |

Silicon connects from a [static IP](#adding-silicons-static-ip-addresses-to-your-allow-list). Supabase accepts traffic from anywhere by default; if you've enabled **Network Restrictions** under **Project Settings -> Database**, add the Silicon IP for your region to the allow-list.

#### Setup options

> [tab] Quickstart repo (recommended)
>
> The [Supabase quickstart repo](https://github.com/meetsilicon/silicon-supabase-quickstart) automates everything below -- clone it and follow the README.
>
> 1. **Clone the repo and install the Silicon CLI:**
>
>    ```bash theme={null}
>    git clone git@github.com:meetsilicon/silicon-supabase-quickstart.git
>    cd silicon-supabase-quickstart
>    brew tap silicon/silicon && brew trust silicon/silicon && brew install silicon
>    silicon login https://app.meetsilicon.com --token <your-token>
>    ```
>
> 2. **Install Silicon skills for your AI agent** -- this loads the Silicon YAML schema into your editor session so the agent can generate and validate models correctly:
>
>    ```bash theme={null}
>    # Claude Code (default)
>    silicon install-skills
>
>    # Cursor
>    silicon install-skills --agent cursor
>
>    # Codex
>    silicon install-skills --agent codex
>    ```
>
> 3. **Connect the Supabase MCP** -- the repo ships with `.cursor/mcp.json` and `.claude/mcp.json` already configured. Open the project in Cursor or Claude Code, authenticate via the browser popup, and verify the `supabase` MCP shows a green status in your editor's MCP settings.
>
> 4. **Connect your database** -- run the setup script and paste in your Supabase pooler credentials when prompted:
>
>    ```bash theme={null}
>    # macOS / Linux
>    bash setup.sh
>
>    # Windows (PowerShell)
>    powershell -ExecutionPolicy Bypass -File ./setup.ps1
>    ```
>
> 5. **Generate models from your schema** -- in Cursor or Claude Code, ask the agent:
>
>    > Look at my Supabase tables and generate Silicon models
>
>    The agent reads your schema through the Supabase MCP and writes YAML files into `silicon/models/` with sensible metrics and dimensions wired up.
>
> 6. **Deploy your project and attach the warehouse:**
>
>    ```bash theme={null}
>    silicon lint
>    silicon deploy --create --no-warehouse-credentials
>    # Then push your warehouse credentials via the API:
>    bash set-warehouse.sh
>    # Windows: powershell -ExecutionPolicy Bypass -File ./set-warehouse.ps1
>    ```
>
> After any model changes, run `silicon lint && silicon deploy --no-warehouse-credentials`. After chart or dashboard changes, run `silicon upload --include-charts`.

> [tab] Manual setup in the UI
>
> 1. In Silicon, go to **Organization settings -> All projects -> Create new** (or **Project settings** for an existing project).
> 2. Pick **Postgres** as the warehouse type.
> 3. Fill in the connection form using the [Supabase parameters mapped above](#get-your-supabase-connection-details).
> 4. Set **SSL mode** to `require`.
> 5. Click **Test & save**.
> 6. Continue to [step 2: import a dbt project](#2-import-a-dbt-project), or use the CLI to deploy a project without dbt -- see the [quickstart repo](https://github.com/meetsilicon/silicon-supabase-quickstart) for an AI-assisted workflow.

#### Troubleshooting

| Problem | Fix |
| :- | :- |
| `password authentication failed for user "postgres"` | Make sure the user is `postgres.<your-project-ref>` (with the project ref suffix) when using the session pooler, not just `postgres`. |
| Connection times out | Confirm you're using the **session pooler** host and port `5432`, not the direct database host. If you've enabled Network Restrictions in Supabase, add the [Silicon static IP](#adding-silicons-static-ip-addresses-to-your-allow-list) for your region. |
| `SSL connection required` | Set **SSL mode** to `require`. |
| MCP keeps disconnecting (quickstart repo) | Restart your editor. On Windows, also check that your firewall isn't blocking outbound HTTPS. |

***

### Redshift

You can see more details in [dbt documentation](https://docs.getdbt.com/reference/warehouse-profiles/redshift-profile).

##### Host

This is the host where the database is running.

##### User

This is the database user name.

##### Password

This is the database user password.

##### DB name

This is the database name.

##### Schema

This is the default schema used by dbt to compile and run your dbt project. You can find this in the dbt cloud IDE or your local `profiles.yml` file.

If you're a dbt cloud user you can find this under your profile in the dbt cloud IDE:

If you work with dbt locally, then check your `profiles.yml` file at `~/.dbt/profiles.yml` and look for a field named `schema`:

```yaml theme={null}
company-name:
  target: dev
  outputs:
    dev:
      type: redshift
      host: hostname.region.redshift.amazonaws.com
      user: username
      password: password1
      port: 5439
      dbname: analytics
      schema: analytics # look for this one!
```

##### Port

This is the port where the database is running.

##### Keep alive idle (seconds)

This specifies the amount of seconds with no network activity after which the operating system should send a TCP keepalive message to the client.

If the database closes its connection while Silicon is waiting for data, you may see the error `SSL SYSCALL error: EOF detected`. Lowering the [keepalives\_idle value](https://www.postgresql.org/docs/9.3/libpq-connect.html) may prevent this, because the server will send a ping to keep the connection active more frequently.

By default, this value is set to 240 seconds, but can be configured lower (perhaps 120 or 60), at the cost of a chattier network connection.

##### SSL mode

This controls how dbt connects to Postgres databases using SSL.

##### RA3 Node

Allow dbt to use cross-database-resources

##### Start of week

This controls what day is the start of the week in Silicon. `Auto` sets it to whatever the default is for your data warehouse. Or, you can customize it and select the day of the week from the drop-down menu. This will be taken into account when using 'WEEK' time interval in Silicon.

##### Use SSH tunnel

Enable to input your **SSH Remote Host**, **SSH Remote Port**, **SSH Username**, and to generate a public SSH key. Use this when your Redshift cluster is in a private VPC and cannot be reached directly from Silicon. See [Connect through an SSH tunnel](https://docs.meetsilicon.com/integrations/connect-through-ssh-tunnel.md) for the full setup.

##### Authentication type

By default Silicon connects to Redshift with a database **username and password**. You can instead authenticate with **AWS IAM**: Silicon mints short-lived Redshift database credentials from AWS at connection time, then connects over the standard Postgres protocol. No long-lived database password is stored. This is useful when your security policy disallows static or hashed passwords, or when your cluster fronts Lake Formation.

Silicon supports three Redshift authentication methods:

* **Username & password**: store a shared Redshift database user and password on the project connection.
* **AWS IAM (CLI credentials)**: users paste temporary AWS credentials, or admins configure an IAM role/access-key identity, and Silicon uses those AWS credentials to mint temporary Redshift database credentials.
* **User Account (Sign in with AWS)**: users sign in through AWS IAM Identity Center in the browser. The project stores the AWS access portal and account/role metadata; each user signs in with AWS and Silicon stores short-lived per-user AWS credentials.

> [!NOTE]
>
> If you don't see the AWS IAM authentication options, they aren't enabled for your organization yet -- contact Silicon support.

When **Authentication type** is set to **AWS IAM (CLI credentials)** or **User Account (Sign in with AWS)**, the following fields replace the password. Your **Host**, **DB name**, **Schema**, SSL, and SSH tunnel settings still apply.

##### AWS region

The AWS region where your Redshift cluster or serverless workgroup is located, for example `us-east-1`.

##### Redshift Serverless

Enable if you're connecting to a Redshift Serverless workgroup rather than a provisioned cluster.

##### Cluster identifier

(Provisioned clusters) The identifier of your Redshift cluster.

##### Workgroup name

(Serverless) The name of your Redshift Serverless workgroup.

##### Database user

(Provisioned clusters) The Redshift database user to request temporary credentials for. Serverless derives the user automatically.

When using **User Account (Sign in with AWS)**, users can optionally set their own database user when they sign in. If they leave it blank, Redshift derives the user from their IAM Identity Center role.

##### Assume role ARN

Optional. An IAM role to assume -- within your own AWS account -- before minting credentials, instead of using the access-key identity directly.

##### Assume role external ID

The external ID required by the role's trust policy, if you configured one.

##### Advanced: AWS access key ID & secret access key

The access key for the IAM user Silicon uses to mint temporary Redshift credentials. This is how you provide the AWS identity.

##### Advanced: Auto-create database user

(Provisioned clusters) Create the database user automatically if it does not already exist.

##### AWS access portal URL

Required for **User Account (Sign in with AWS)**. The IAM Identity Center access portal URL users open to sign in, for example `https://d-xxxxxxxxxx.awsapps.com/start`.

##### IAM Identity Center region

Required for **User Account (Sign in with AWS)**. The AWS region where IAM Identity Center is enabled.

##### AWS account ID

Required for **User Account (Sign in with AWS)**. The AWS account users should access through IAM Identity Center.

##### AWS role name

Required for **User Account (Sign in with AWS)**. The IAM Identity Center permission set role name users select when signing in. This is usually the permission set name shown in the AWS access portal, for example `SiliconRedshiftReadOnly`.

> [accordion] Setting up AWS IAM CLI credentials for Redshift
>
> > [!NOTE]
> >
> > IAM changes how Silicon **authenticates**, not how it **reaches** your warehouse. Silicon still opens a network connection to your cluster, so its [static IP addresses](#adding-silicons-static-ip-addresses-to-your-allow-list) must be allow-listed in your Redshift security group or VPC firewall (or use an SSH tunnel), exactly as with password authentication. Minting credentials happens over public AWS API endpoints and needs no extra allow-listing.
>
> **1. Create an IAM policy** that allows minting credentials. Use the variant for your warehouse type.
>
> Provisioned cluster:
>
> ```json theme={null}
> {
>   "Version": "2012-10-17",
>   "Statement": [{
>     "Sid": "SiliconRedshiftCredentials",
>     "Effect": "Allow",
>     "Action": "redshift:GetClusterCredentials",
>     "Resource": [
>       "arn:aws:redshift:<region>:<account-id>:dbuser:<cluster-identifier>/<db-user>",
>       "arn:aws:redshift:<region>:<account-id>:dbname:<cluster-identifier>/<db-name>"
>     ]
>   }]
> }
> ```
>
> If you enable **Auto-create database user**, also allow `redshift:CreateClusterUser` on the `dbuser:` resource. If you use database groups, add `redshift:JoinGroup` on the relevant `dbgroup:` resources.
>
> Serverless workgroup:
>
> ```json theme={null}
> {
>   "Version": "2012-10-17",
>   "Statement": [{
>     "Sid": "SiliconRedshiftServerlessCredentials",
>     "Effect": "Allow",
>     "Action": "redshift-serverless:GetCredentials",
>     "Resource": "arn:aws:redshift-serverless:<region>:<account-id>:workgroup/<workgroup-id>"
>   }]
> }
> ```
>
> **2. Create an identity to call that API.**
>
> * **Access keys.** Create an IAM user, attach the policy above, generate an access key and secret, and enter them under **Advanced** on the connection form. Silicon has no AWS identity of its own, so this is how you grant access. Keep the policy minimal and rotate the key periodically.
>
> * **Assume role (optional).** If you'd rather not grant the IAM user the Redshift permissions directly, attach the policy to a separate IAM role and let the user assume it: add a trust policy on the role allowing that user to assume it, then enter the role ARN (and external ID, if set) on the form. The role is assumed **within your own AWS account**.
>
> **3. Configure the connection in Silicon.** Open your project's connection settings -- [**Project settings** via the gear icon in the top-right navigation](#open-up-your-silicon-instance-to-get-started) for an existing project, or **Organization settings -> All projects -> Create new** for a new one. In the Redshift form, switch **Authentication type** to **AWS IAM (CLI credentials)** (this reveals the AWS fields), then fill in the **AWS region**, **cluster identifier** (or serverless **workgroup name**), **database user**, and your access keys under **Advanced**, and click **Test & save**.

> [accordion] Setting up AWS IAM Identity Center for Redshift
>
> Use **User Account (Sign in with AWS)** when each Silicon user should authenticate with their own AWS identity in the browser. This is the best fit for shared Silicon instances because the AWS access portal, account ID, and role name are stored on the project connection, while each user's AWS session is stored as personal warehouse credentials.
>
> > [!NOTE]
> >
> > Do not configure this with Silicon environment variables. IAM Identity Center settings are project-specific: different Redshift projects can use different AWS accounts, access portals, regions, and permission sets.
>
> **Requirements**
>
> * An AWS Organizations-backed IAM Identity Center instance. Account instances of IAM Identity Center do not support permission sets or AWS account access.
> * A user or group assigned to the AWS account through an IAM Identity Center permission set.
> * A permission set or IAM policy that can mint Redshift database credentials:
>   * Provisioned Redshift: `redshift:GetClusterCredentials` and, if needed, `redshift:CreateClusterUser` / `redshift:JoinGroup`.
>   * Redshift Serverless: `redshift-serverless:GetCredentials`.
> * The Redshift database user created by IAM must have database permissions such as `USAGE` on the schema and `SELECT` on the tables Silicon queries.
> * Network access from Silicon to Redshift, exactly as with password authentication.
>
> **1. Enable IAM Identity Center.** In AWS, enable IAM Identity Center as an organization instance and choose the region users will sign in through.
>
> **2. Create a permission set.** Attach a policy that can mint Redshift credentials for your cluster or serverless workgroup. For production, keep this policy scoped to the cluster/workgroup and database your Silicon project uses.
>
> **3. Assign users or groups to the AWS account.** Assign the permission set to the AWS account your Redshift warehouse lives in. Users should be able to open the AWS access portal and see that account and role.
>
> **4. Grant Redshift database permissions.** IAM authentication creates or uses a Redshift database user derived from the AWS role. Grant that database user access to the schemas and tables Silicon should query.
>
> Example for a Redshift Serverless IAM role-derived user:
>
> ```sql theme={null}
> GRANT USAGE ON SCHEMA analytics TO "IAMR:AWSReservedSSO_SiliconRedshiftReadOnly_xxxxxxxxxxxxxxxx";
> GRANT SELECT ON ALL TABLES IN SCHEMA analytics TO "IAMR:AWSReservedSSO_SiliconRedshiftReadOnly_xxxxxxxxxxxxxxxx";
> ALTER DEFAULT PRIVILEGES IN SCHEMA analytics
>   GRANT SELECT ON TABLES TO "IAMR:AWSReservedSSO_SiliconRedshiftReadOnly_xxxxxxxxxxxxxxxx";
> ```
>
> **5. Configure the connection in Silicon.** In the Redshift form, switch **Authentication type** to **User Account (Sign in with AWS)**, then fill in:
>
> * **AWS region**: Redshift cluster/workgroup region.
> * **Cluster identifier** or **Workgroup name**.
> * **AWS access portal URL**: the IAM Identity Center start URL.
> * **IAM Identity Center region**.
> * **AWS account ID**.
> * **AWS role name**: the permission set/role users select in the AWS access portal.
>
> After saving, users who open the project will see **Sign in with AWS**. They complete the AWS browser login and Silicon stores their personal short-lived AWS credentials for queries.

***

### Snowflake

You can see more details in [dbt documentation](https://docs.getdbt.com/reference/warehouse-profiles/snowflake-profile).

To let Snowflake apply its own policies to agent queries, see [Snowflake agent sign-in](https://docs.meetsilicon.com/agents/agent-identity.md#snowflake-agent-sign-in-for-each-person).

##### Account

This is your Snowflake [account identifer](https://docs.snowflake.com/en/user-guide/admin-account-identifier.html#format-1-preferred-account-name-in-your-organization).

The easiest way to find this is to login to Snowflake in your browser. Your account identifier is found in the URL in the format `<organization_id>-<account_id>`.

For example, if your Snowflake URL looks like `https://app.snowflake.com/ehcrzll/aaa99827/#/homepage`, your account identifier would be `ehcrzll-aaa99827` (combining both IDs with a hyphen).

> [!NOTE]
>
> **Important:** The account identifier requires both the organization ID and account ID separated by a hyphen, not just the account name alone.

You can also find your account identifier by using the format `<organization_name>-<account_name>` where `organization_name` and `account_name` can be found by following any of the methods listed in [Managing accounts in your organization](https://docs.snowflake.com/en/user-guide/organizations-manage-accounts.html#label-viewing-organization-name).

##### User

This is the login name for your Snowflake user. This is usually the same username you use to login to Snowflake.

Alternatively, you can [create a new user through the snowflake console](https://docs.snowflake.com/en/user-guide/admin-user-management.html)with a username and password specifically for Silicon to use.

If you're a snowflake admin you can list all users available in the snowflake console:

##### Authentication type

Choose to authenticate using either a user account (using "Sign in with Snowflake" or "Connect via Silicon CLI (SSO)") or with a service account using a JSON key file or password.

##### Connect via Silicon CLI (SSO)

> [!NOTE]
>
> This method is available behind the `new-onboarding` feature flag and only applies during **project creation**. Contact Silicon support to enable it for your workspace.

Use this when your Snowflake account requires SSO (or MFA) and you don't want to paste a password, private key, or PAT to create the project. The Silicon CLI signs you in to Snowflake in your browser and provisions a durable credential that is deposited straight into the project connection form -- you never handle the secret yourself.

**How it works:**

1. In the Snowflake connection form, choose **Connect via Silicon CLI (SSO)**. Silicon generates a single-use connect code (valid for 15 minutes) and shows the CLI command to run.

2. Run the command shown in the setup wizard from a machine that has the [Silicon CLI](https://docs.meetsilicon.com/workflow/cli/reference.md) installed:

   ```bash theme={null}
   silicon connect-snowflake \
     --url https://app.meetsilicon.com \
     --code <one-time-code> \
     --account ecomstore-xy12345
   ```

3. The CLI opens your Snowflake SSO login in a browser. Once you sign in, the CLI mints a durable Snowflake credential and deposits it into the setup wizard tab.

4. The wizard shows **Connected as `<user>` ✓** and pre-fills smart defaults from your Snowflake session inventory: the largest database is picked as the default, the recommended compute warehouse is auto-selected, and the first available schema in the chosen database is filled in. Adjust any of these from the dropdowns, then submit the form to create the project.

**Credential type the CLI provisions:**

The CLI never deposits your raw SSO token. It tries, in order:

1. **Key-pair authentication (preferred)** -- generates a local RSA-2048 key-pair and registers the public key in the first free slot on your Snowflake user with `ALTER USER ... SET RSA_PUBLIC_KEY`. The key is verified with a diagnostic connection before deposit.
2. **Programmatic Access Token (PAT)** -- if key-pair provisioning fails (for example, because both `RSA_PUBLIC_KEY` slots are already in use), the CLI falls back to a Snowflake [Programmatic Access Token](https://docs.snowflake.com/en/user-guide/programmatic-access-tokens) valid for 365 days.

If both fail, the CLI prints admin remediation SQL and exits without depositing a credential.

**Optional flags:**

You can preset any of `--user`, `--database`, `--warehouse`, `--role`, or `--schema`. Anything not provided is filled from your Snowflake session defaults, or picked in the browser tab from the discovered options.

**Security notes:**

* The connect code is single-use and expires after 15 minutes; only a SHA-256 hash of it is stored server-side.
* Generating a new connect code invalidates any previous codes for your user.
* A code can only be claimed once, by the user who created it.
* Deposited credentials are encrypted at rest and cleared from the deposit store as soon as the browser tab claims them.

##### Sign in with Snowflake

This method requires you to configure an Oauth2 flow from your Snowflake warehouse.

> [accordion] Adding security integration on Snowflake warehouse
>
> To do this, first open an SQL console on your Snowflake warehouse, and create a `security integration` like this:
>
> ```
> CREATE SECURITY INTEGRATION silicon_oauth
>   TYPE = OAUTH
>   ENABLED = TRUE
>   OAUTH_CLIENT = 'CUSTOM'
>   OAUTH_CLIENT_TYPE = 'CONFIDENTIAL'
>   OAUTH_REDIRECT_URI = 'https://<customer>.meetsilicon.com/api/v1/oauth/redirect/snowflake'
>   OAUTH_ISSUE_REFRESH_TOKENS = TRUE
> ```
>
> Now you can get the integration details using
>
> ```
> DESCRIBE SECURITY INTEGRATION silicon_oauth;
>
> ```
>
> Copy the `OAUTH_AUTHORIZATION_ENDPOINT` and `OAUTH_TOKEN_ENDPOINT`
>
> Then run
>
> ```
> SELECT SYSTEM$SHOW_OAUTH_CLIENT_SECRETS('SILICON_OAUTH');
> ```
>
> And copy the `OAUTH_CLIENT_SECRET`, `OAUTH_CLIENT_SECRET_2` and `OAUTH_CLIENT_ID`
>
> Finally, contact the Silicon Team [support@meetsilicon.com](mailto:support@meetsilicon.com) to setup Sign in with Snowflake for your instance.

You can read more about this on [Snowflake official docs](https://docs.snowflake.com/en/user-guide/oauth-snowflake-overview)

##### Private Key

You can generate a Private Key for a Snowflake user following the guide [here](https://docs.snowflake.com/en/user-guide/key-pair-auth#generate-the-private-key)

Once generated, copy across the Private Key File that is generated into Silicon. If you chose to encrypt your private key you will also need to supply the Private Key Passphrase.

##### Password

This is the password your Snowflake user. This is usually the same password you use to login to Snowflake. Note that due to changes in Snowflake Authentication, users that require passwords may also need to enable MFA, which is not compatible with a Silicon project connection.

##### Role

This is the security role that you would like to use when running queries as the specified user. The role must have access to any warehouses, databases, schemas, and tables you want to use.

If you're a Snowflake admin you can list all roles available in the snowflake console:

You can configure your role to allow read access to all warehouses, databases, schemas, and tables by following the guide for[Creating custom read-only roles](https://docs.snowflake.com/en/user-guide/security-access-control-configure.html#creating-custom-read-only-roles).

##### Database

This is the name of your database. The specified user must be granted access to this database. You can see a list of databases available in the snowflake console:

##### Warehouse

This is the name of the warehouse you would like to use for running queries. The specified user must be grantend access to use this warehouse. You can see al list of warehouses available in the snowflake console:

> [!NOTE]
>
> If "Always use this warehouse" is set to yes, this warehouse will be used for all queries, even if the dbt configuration specifies a different warehouse using snowflake\_warehouse.

##### Schema

This is the default schema used by dbt to compile and run your dbt project. You can find this in the dbt cloud IDE or your local `profiles.yml` file.

If you're a dbt cloud user you can find this under your profile in the dbt cloud IDE:

If you work with dbt locally, then check your `profiles.yml` file at `~/.dbt/profiles.yml` and look for a field named `schema`:

```yaml theme={null}
my-snowflake-db:
  target: dev
  outputs:
    dev:
      type: snowflake
      account: [account id]
      user: [username]
      password: [password]
      role: [user role]
      database: [database name]
      warehouse: [warehouse name]
      schema: [dbt schema] # Look for this one!
```

##### Keep client session alive

This is intended to keep Snowflake sessions alive beyond the typical 4 hour timeout limit. You can see more details in [dbt documentation](https://docs.getdbt.com/reference/warehouse-profiles/snowflake-profile#client%5Fsession%5Fkeep%5Falive).

##### Query tag

A value with which to tag all queries, for later searching in [QUERY\_HISTORY view](https://docs.snowflake.com/en/sql-reference/account-usage/query%5Fhistory.html))

##### Start of week

This controls what day is the start of the week in Silicon. `Auto` sets it to whatever the default is for your data warehouse. Or, you can customize it and select the day of the week from the drop-down menu. This will be taken into account when using 'WEEK' time interval in Silicon.

***

### Databricks

The credentials needed to connect to your cluster can be found in the ODBC options in your databricks account:

1. Go to the `Compute` tab in the sidebar.

2. Click the configuration tab for the cluster that you're connecting to Silicon.

3. Expand the `Advanced options` tab

4. Open the `JDBC/ODBC` tab

##### Server hostname

Follow the instructions above to find your ODBC connection instructions.

##### HTTP Path

Follow the instructions above to find your ODBC connection instructions.

##### Port

Follow the instructions above to find your ODBC connection instructions.

##### Authentication type

Choose to authenticate using either a user account (using "Sign in with Databricks") or with a Personal Access Token.

##### Sign in with Databricks

This method requires you to configure an OAuth application in your Databricks workspace.

> [accordion] Adding OAuth application on Databricks workspace
>
> To do this, first go to your Databricks workspace settings:
>
> 1. Access Account Console
>    * Log into your Databricks account console
>    * Click the Settings icon in the sidebar
> 2. Navigate to App Connections
>    * Go to the App connections tab
>    * Click Add connection
> 3. Configure the application with the following settings:
>    * **Application Name**: `Silicon` (or any name you prefer)
>    * **Redirect URL**: `https://<customer>.meetsilicon.com/api/v1/oauth/redirect/databricks`
>    * **Access scopes**: all-apis and offline\_access
>    * **Client Secret**: optional
> 4. Click **Create**
> 5. Copy the **Client ID** and **Client Secret**
>
> Finally, contact the Silicon Team at [support@meetsilicon.com](mailto:support@meetsilicon.com) to set up Sign in with Databricks for your instance.

You can read more about this on [Databricks official docs](https://docs.databricks.com/aws/en/dev-tools/auth/oauth-m2m).

##### Personal Access Token

Your personal access token can be found in your user settings in databricks:

1. Open `Settings` by clicking the cog ⚙ in the sidebar and select `User settings`

2. Click `Generate token`. You'll be asked to enter a name and expiry.

3. Copy the token

##### Database

The default database name used by dbt for this connection.

##### Start of week

This controls what day is the start of the week in Silicon. `Auto` sets it to whatever the default is for your data warehouse. Or, you can customize it and select the day of the week from the drop-down menu. This will be taken into account when using 'WEEK' time interval in Silicon.

***

### Trino

Silicon connects to your Trino cluster and queries the catalogs it exposes -- it doesn't connect to the underlying data sources directly. This means that if Silicon doesn't have a native connection for your warehouse but your Trino cluster can reach it through a [Trino connector](https://trino.io/docs/current/connector.html), you can still explore that warehouse in Silicon by connecting through Trino.

We only support [LDAP authentication with Trino](https://trino.io/docs/current/security/ldap.html). You can see more details in [dbt's documentation](https://docs.getdbt.com/reference/warehouse-setups/trino-setup#configuration).

##### Host

The hostname of your cluster. E.g. `mycluster.mydomain.com`

Don't include the http\:// or https\:// prefix.

##### User

The username (of the account) to log in to your cluster. When connecting to Starburst Galaxy clusters, you must include the role of the user as a suffix to the username.

Format for Starburst Enterprise or Trino: `user.name` or `user.name@mydomain.com`

Format for Starburst Galaxy:`user.name@mydomain.com/role`

##### Password

This is the password for authentication.

##### DB name

Specify the name of the database that your dbt models are built into. This is the name of a catalog in your cluster.

e.g. `my_postgres_catalog`

##### Port

The port to connect to your cluster. By default, it's 443 for TLS enabled clusters.

e.g. `443`

##### SSL mode

This controls how dbt connects to Trino database using SSL.

##### Start of week

This controls what day is the start of the week in Silicon. `Auto` sets it to whatever the default is for your data warehouse. Or, you can customize it and select the day of the week from the drop-down menu. This will be taken into account when using 'WEEK' time interval in Silicon.

***

### ClickHouse

You can see more details in [dbt documentation](https://docs.getdbt.com/reference/warehouse-profiles/clickhouse-profile).

##### Host

This is the host where your ClickHouse database is running.

##### User

This is the ClickHouse database user name.

##### Password

This is the ClickHouse database user password.

##### DB name

This is the ClickHouse database name.

##### Schema

This is the default schema used by dbt to compile and run your dbt project. You can find this in your local `profiles.yml` file.

If you work with dbt locally, then check your `profiles.yml` file at `~/.dbt/profiles.yml` and look for a field named `schema`:

```yaml theme={null}
my-clickhouse-db:
  target: dev
  outputs:
    dev:
      type: clickhouse
      host: [hostname]
      user: [username]
      password: [password]
      port: [port]
      schema: [dbt schema] # Look for this one!
```

##### Port

This is the port where the ClickHouse database is running. The default port for ClickHouse HTTP interface is 8123.

##### Secure

Enable this option to use HTTPS/SSL for secure connections to your ClickHouse database.

##### Retries

The number of times Silicon should retry ClickHouse queries that result in unhandled server errors. By default, this is set to 3.

##### Start of week

This controls what day is the start of the week in Silicon. `Auto` sets it to whatever the default is for your data warehouse. Or, you can customize it and select the day of the week from the drop-down menu. This will be taken into account when using 'WEEK' time interval in Silicon.

#### Known issues

##### Boolean expression columns must be typed as boolean

ClickHouse represents the result of boolean expressions, like `status = 'active'`, as `UInt8`. If the column is not typed as boolean in your dbt schema, Silicon may treat it as a string dimension and generate a filter like `IN ('true')`. ClickHouse rejects this with an error like `Cannot convert string 'true' to type UInt8`.

To avoid this, explicitly type boolean expression columns as `boolean` in your dbt schema:

```yaml theme={null}
models:
  - name: orders
    columns:
      - name: is_active
        data_type: boolean
```

Or set the Silicon dimension type:

```yaml dbt v1.10+ theme={null}
models:
  - name: orders
    columns:
      - name: is_active
        config:
          meta:
            dimension:
              type: boolean
```

```yaml dbt v1.9 and earlier theme={null}
models:
  - name: orders
    columns:
      - name: is_active
        meta:
          dimension:
            type: boolean
```

***

### DuckDB

Silicon supports DuckDB project connections in two modes:

* **MotherDuck** -- managed cloud DuckDB
* **DuckLake** -- a [DuckLake](https://ducklake.select/) catalog backed by your own metadata store (Postgres, SQLite, or a DuckDB file) and your own data store (S3-compatible, GCS, Azure Blob, or local filesystem)

Pick the mode from the **MotherDuck / DuckLake** toggle at the top of the connection form. Both modes use the same `dbt-duckdb` adapter -- see the [dbt-duckdb documentation](https://docs.getdbt.com/reference/resource-configs/duckdb-configs) for adapter-level details.

DuckDB connections in Silicon require dbt `v1.8` or later.

#### MotherDuck

Silicon supports DuckDB project connections through [MotherDuck](https://motherduck.com/).

##### Database

This is your MotherDuck database name.

For example, if your dbt profile uses `path: "md:analytics"`, the database value in Silicon is `analytics`.

##### Schema

This is the schema in your MotherDuck database that Silicon should use.

##### Access token

This is your MotherDuck access token. You can create one from your MotherDuck account settings.

We recommend using a dedicated token for Silicon with access only to the database(s) you want to query.

##### Threads

The number of threads dbt should use for this connection. If you're not sure what to use, start with `1`.

##### Start of week

This controls what day is the start of the week in Silicon. `Auto` sets it to whatever the default is for your data warehouse. Or, you can customize it and select the day of the week from the drop-down menu. This will be taken into account when using 'WEEK' time interval in Silicon.

If you work with dbt locally, your `profiles.yml` should look similar to this:

```yaml theme={null}
my-motherduck-db:
  target: prod
  outputs:
    prod:
      type: duckdb
      path: "md:analytics"
      schema: main
      threads: 4
      extensions:
        - motherduck
      settings:
        motherduck_token: "{{ env_var('MOTHERDUCK_TOKEN') }}"
```

#### DuckLake

[DuckLake](https://ducklake.select/) separates **catalog metadata** (where DuckLake records tables, schemas, and snapshots) from **data files** (the Parquet files themselves). Silicon attaches the catalog read-only on a warm in-memory DuckDB instance and reads data files from your chosen object store.

You configure two backends independently: a catalog backend and a data path backend.

##### Schema

The default DuckLake schema your queries will use (for example, `main`).

##### Catalog alias

The alias under which Silicon attaches the DuckLake catalog. Defaults to `ducklake`. This is the name Silicon exposes as the database in dbt and in queries.

##### Catalog backend

Where DuckLake stores its metadata. Choose one of:

* **PostgreSQL** -- recommended for multi-pod deployments. Silicon will need `host`, `port`, `database`, `user`, and `password`.
* **SQLite** -- a SQLite file on the Silicon server. Provide the absolute path to the catalog file.
* **DuckDB** -- a DuckDB file on the Silicon server. Provide the absolute path to the catalog file.

> [!WARNING]
>
> SQLite and DuckDB catalogs live on the Silicon server's local filesystem and are only viable for single-pod deployments. Use a PostgreSQL catalog if you run more than one Silicon pod.

##### Data path backend

Where DuckLake reads Parquet data files from. Choose one of:

* **S3-compatible** -- `url` (e.g. `s3://my-bucket/path/`), optional `endpoint` and `region`, optional `accessKeyId` + `secretAccessKey`, and an optional path-style URL toggle. Leave the keys blank to use the SDK credential chain (IAM role, web identity, etc.).
* **Google Cloud Storage** -- `url` (e.g. `gs://my-bucket/path/`) and optional HMAC `keyId` + `secret`. Leave the HMAC fields blank to use the SDK credential chain.
* **Azure Blob Storage** -- `url` (e.g. `azure://container/path/` or `abfss://container@account.dfs.core.windows.net/path/`). Authenticate with either a `connectionString` (takes precedence) or `accountName` + `accountKey`.
* **Local filesystem** -- a directory on the Silicon server. Only viable for single-pod deployments.

##### Threads

The number of threads dbt should use for this connection. If you're not sure what to use, start with `1`.

##### Start of week

This controls what day is the start of the week in Silicon. `Auto` sets it to whatever the default is for your data warehouse.

##### dbt profile examples

If you work with dbt locally, your `profiles.yml` should look similar to one of these.

PostgreSQL catalog + S3 data path:

```yaml theme={null}
my-ducklake-db:
  target: prod
  outputs:
    prod:
      type: duckdb
      path: ":memory:"
      database: ducklake
      schema: main
      threads: 4
      extensions: [ducklake, postgres, httpfs]
      settings:
        autoinstall_known_extensions: true
        autoload_known_extensions: true
      attach:
        - alias: ducklake
          path: "ducklake:ld_ducklake"
      secrets:
        - name: ld_ducklake_catalog
          type: postgres
          host: pg.example.com
          port: 5432
          database: catalog
          user: "{{ env_var('DUCKLAKE_CATALOG_USER') }}"
          password: "{{ env_var('DUCKLAKE_CATALOG_PASSWORD') }}"
        - name: ld_ducklake_data
          type: s3
          scope: "s3://my-bucket/path/"
          region: us-east-1
          key_id: "{{ env_var('AWS_ACCESS_KEY_ID') }}"
          secret: "{{ env_var('AWS_SECRET_ACCESS_KEY') }}"
        - name: ld_ducklake
          type: ducklake
          data_path: "s3://my-bucket/path/"
          metadata_parameters:
            TYPE: postgres
            SECRET: ld_ducklake_catalog
```

SQLite catalog + local data path:

```yaml theme={null}
my-ducklake-db:
  target: prod
  outputs:
    prod:
      type: duckdb
      path: ":memory:"
      database: ducklake
      schema: main
      threads: 4
      extensions: [ducklake, sqlite]
      settings:
        autoinstall_known_extensions: true
        autoload_known_extensions: true
      attach:
        - alias: ducklake
          path: "ducklake:sqlite:/var/lib/ducklake/catalog.sqlite"
          options:
            data_path: "/var/lib/ducklake/data"
```

***

### Athena

You can see more details in [dbt documentation](https://docs.getdbt.com/docs/core/connect-data-platform/athena-setup).

##### AWS Region

The AWS region where your Athena workgroup is located (e.g. `us-east-1`, `eu-west-1`).

##### Catalog

This is the Athena data catalog name. For most setups, this is `AwsDataCatalog`.

##### Database

This is the Athena database name (also known as schema in other warehouses). This is where your dbt models are materialized.

##### S3 Staging Directory

The S3 location where Athena stores query results. This is required for all Athena queries.

e.g. `s3://your-bucket/athena-results/`

##### S3 Data Directory (optional)

The S3 location for storing table data when materializing models. This is optional and only needed if you're using dbt to create tables.

e.g. `s3://your-bucket/data/`

##### AWS Access Key ID

Your AWS access key ID for authentication. This should belong to an IAM user with permissions to run Athena queries and access the S3 buckets specified above.

##### AWS Secret Access Key

Your AWS secret access key for authentication.

Create a dedicated IAM user or role for Silicon with minimal permissions:

* `AmazonAthenaFullAccess`, or a more restrictive custom policy
* S3 read/write access to your staging and data directories

To connect without storing access keys, choose **Web Identity (No Keys)** as the authentication type. See [Connect Athena with web identity](https://docs.meetsilicon.com/integrations/connect-athena-with-web-identity.md).

##### Workgroup (optional)

The Athena workgroup to use for queries. If not specified, the default workgroup (`primary`) is used.

##### Threads (optional)

The number of threads dbt should use. Default is 1.

##### Number of Retries (optional)

The number of times to retry failed queries. Default is 5.

##### Start of week

This controls what day is the start of the week in Silicon. `Auto` sets it to whatever the default is for your data warehouse. Or, you can customize it and select the day of the week from the drop-down menu. This will be taken into account when using 'WEEK' time interval in Silicon.

***

## 2. Import a dbt project

You don't have to connect a git repository to sync your dbt project to Silicon. There are two approaches:

* **CLI deploy:** you compile the dbt project locally or in CI with `silicon deploy`, and Silicon doesn't need a remote git connection.
* **Git connection:** Silicon pulls a connected branch from GitHub, GitLab, Azure DevOps, Bitbucket, or dbt Cloud and compiles it server-side.

To compare them and choose a method, see [Syncing your dbt project to Silicon](https://docs.meetsilicon.com/integrations/dbt/projects.md#syncing-your-dbt-project-to-silicon).

To set your dbt connection type in Silicon, follow the steps below.

> [accordion] I'm using dbt Cloud, should I connect using my git repository or through dbt Cloud?
>
> Generally, **we recommend connecting via git repository for most users**, unless you specifically need to use features that are only available when connecting via dbt Cloud.
>
> For example, if you are using [cross project references](https://docs.getdbt.com/docs/mesh/govern/project-dependencies#how-to-write-cross-project-ref) in dbt Cloud, you'll *need* to use that connection type, or Silicon won't be able to compile your projects.
>
> If you connect via git repository, you need to make sure that your environment version in dbt Cloud is set to ['Compatible'](https://docs.getdbt.com/docs/dbt-versions/cloud-release-tracks).

To choose how Silicon syncs your dbt project, head to your project connection settings in Silicon:

Then scroll down to the dbt project section:

Pick your connection type and follow the guide below: [GitHub](#github), [GitLab](#gitlab), [Azure DevOps](#azure-devops), [Bitbucket](#bitbucket), [dbt Cloud](#dbt-cloud), or the [CLI](#cli).

> [!NOTE]
>
> **dbt Cloud managed repositories**
>
> Support for connecting Silicon to [dbt Cloud managed repositories](https://docs.getdbt.com/docs/dbt-cloud/cloud-configuring-dbt-cloud/cloud-using-a-managed-repository) is in beta. If you're using dbt Cloud and you'd like to use Silicon, please reach out to us.

### GitHub

##### Semantic layer format

Choose **dbt** for a dbt project or **Native Silicon YAML** for standalone Silicon models. See [Connect through GitHub](https://docs.meetsilicon.com/semantic-layer/yaml.md#connect-through-github) for native setup and supported features. The dbt-specific settings below apply when **dbt** is selected.

###### OAuth (recommended authorization method)

We recommend you connect to Github using OAuth. This gives Silicon a direct connection to the repo, so it won't lose access when individuals leave the company, and it can create pull requests, which is required for [dbt write-back features](https://docs.meetsilicon.com/integrations/dbt/write-back.md). This connection lives at the organization level, so you can map different dbt project repos to each Silicon project without needing a new access token.

###### Personal access token (classic authorization method)

This is used to access your repo. See the [instructions for creating a personal access token here](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token).

Select `repo` scope when you're creating the token.

###### Fine-grained access token

Fine-grained access tokens let you limit access to specific repositories on your GitHub account. You can read more about them in the [GitHub docs](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token#creating-a-fine-grained-personal-access-token).

1. Go to [Settings > Developer access > Personal access tokens > Fine-grained token](https://github.com/settings/personal-access-tokens/new)

2. Add the name, expiration, description and owner (we'll need their username later)

3. Add the repositories you want Silicon to access. You might want to give access only to the repository where your `dbt` project is located.

4. On `Repository` permissions, select `Contents` --> `Read and Write` and `Pull Requests` --> `Read and Write`.

5. Click `Generate token` and copy the token.

You could also replace your old tokens with new fine-grained tokens on project settings.

##### Repository

This should be in the format `my-org/my-repo`. e.g. `silicon/silicon-analytics`

##### Branch

This is the branch in your GitHub repo that Silicon should sync to. e.g. `main`, `master` or `dev`

By default, we've set this to `main` but you can change it to whatever you'd like.

##### Project directory path

For **dbt**, this is the folder where your `dbt_project.yml` file is found in the GitHub repository you entered above. For **Native Silicon YAML**, use the [native project directory](https://docs.meetsilicon.com/semantic-layer/yaml.md#project-layout).

* Put `/` if your `dbt_project.yml` file is in the main folder of your repo (e.g. silicon/silicon-analytics/dbt\_project.yml)

* Include the path to the sub-folder where your dbt project is if your dbt project is in a sub-folder in your repo. For example, if my project was in silicon/silicon-analytics/dbt/dbt\_project.yml, I'd write `/dbt` in this field.

##### Host domain

If you've [customized the domain for your GitHub pages](https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/about-custom-domains-and-github-pages), you can add the custom domain for your project in here.

By default, this is `github.com`

> [!TIP]
>
> If you selected **dbt**, fill out the [dbt project details](https://docs.meetsilicon.com/integrations/dbt/projects.md#dbt-project-settings). For **Native Silicon YAML**, save the connection to compile your models.

***

### GitLab

##### Personal access token

This is used to access your repo. See the [instructions for creating a personal access token here](https://docs.gitlab.com/ee/user/profile/personal%5Faccess%5Ftokens.html).

Select `read_repository` scope when you're creating the token. The token, if using a **project access token**, or the user, when using a **personal access token**, needs to have permission to download the code. Normally this would be the `Reporter` role.

##### Repository

You can find this in the GitLab URL when you're in your repo. This should be in the format `my-org/my-repo`. e.g. if my browser had [`https://gitlab.com/silicon/silicon-analytics.gitlab.io`](https://gitlab.com/silicon/silicon-analytics.gitlab.io), I'd put in: `silicon/silicon-analytics` as my repository in Silicon.

##### Branch

This is the branch in your GitLab repo that Silicon should sync to. e.g. `main`, `master` or `dev`

By default, we've set this to `main` but you can change it to whatever you'd like.

##### Project directory path

This is the folder where your `dbt_project.yml` file is found in the GitLab repository you entered above.

If your `dbt_project.yml` file is in the main folder of your repo (e.g. `silicon/silicon-analytics/dbt_project.yml`), then you don't need to change anything in here. You can just leave the default value we've put in.

If your dbt project is in a sub-folder in your repo (e.g. `silicon/silicon-analytics/dbt/dbt_project.yml`), then you'll need to include the path to the sub-folder where your dbt project is (e.g. `/dbt`).

##### Host domain

If you've [customized the domain for your GitLab pages](https://docs.gitlab.com/ee/user/project/pages/getting%5Fstarted%5Fpart%5Fone.html), you can add the custom domain for your project in here.

By default, this is `gitlab.io`.

> [!TIP]
>
> After adding your Gitlab information, fill out the [dbt project details](https://docs.meetsilicon.com/integrations/dbt/projects.md#dbt-project-settings) and you're all set!

***

### Azure DevOps

##### Personal access token

This is your secret token used to access Azure Devops. See the [instructions to create a personal access token](https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops\&tabs=Windows)You must specify at least the Repo:Read scope.

##### Organization

This is the name of the organization that owns your repository

##### Project

This is the name of the project that owns your repository

##### Repository

This is the name of the repository. For many projects, this is the same as your project name above.

##### Branch

This is the branch in your repository that Silicon should sync to. e.g. `main`, `master` or `dev`

By default, we've set this to `main` but you can change it to whatever you'd like.

##### Project directory path

This is the folder where your `dbt_project.yml` file is found in the repository you entered above.

If your `dbt_project.yml` file is in the main folder of your repo (e.g. `silicon/silicon-analytics/dbt_project.yml`), then you don't need to change anything in here. You can just leave the default value we've put in.

If your dbt project is in a sub-folder in your repo (e.g. `silicon/silicon-analytics/dbt/dbt_project.yml`), then you'll need to include the path to the sub-folder where your dbt project is (e.g. `/dbt`).

> [!TIP]
>
> After adding the Azure DevOps details, fill out the [dbt project details](https://docs.meetsilicon.com/integrations/dbt/projects.md#dbt-project-settings) and you're all set!

***

### Bitbucket

Connect a dbt or native Silicon YAML repository on Bitbucket Cloud using the project's **API Token** field. Choose **Bitbucket** in your project's connection settings.

#### Bitbucket Cloud API token

For repositories on `bitbucket.org`, use a personal API token with scopes. Follow [Atlassian's token creation instructions](https://support.atlassian.com/bitbucket-cloud/docs/create-an-api-token/):

1. Open your Atlassian account's **Security** settings, then **Create and manage API tokens**.
2. Select **Create API token with scopes**, name the token, and choose its expiry date.
3. Select **Bitbucket** as the app, then choose the permissions below.
4. Create the token and copy it into Silicon's **API Token** field. Atlassian displays the token only once.

| Permission | Scope | When needed |
| - | - | - |
| Repositories: Read | `read:repository:bitbucket` | Connecting and syncing the dbt project |
| Repositories: Write | `write:repository:bitbucket` | Writeback |
| Pull requests: Read | `read:pullrequest:bitbucket` | Writeback |
| Pull requests: Write | `write:pullrequest:bitbucket` | Writeback |

Select all four permissions for writeback. Write scopes do not include read scopes; see [Atlassian's API token permissions](https://support.atlassian.com/bitbucket-cloud/docs/api-token-permissions/). A connection used only to read and sync the repository needs only Repositories: Read.

The token's owner must have access to the repository and permission to push branches and create pull requests. Bitbucket writeback uses that person's identity. Silicon users still need [source-code write permissions](https://docs.meetsilicon.com/workspace-admin/roles.md) on the project to use the stored token. No Bitbucket OAuth connection or Silicon GitHub App installation is required.

#### Connection fields

* **Semantic layer format:** choose **dbt** or **Native Silicon YAML**. For native setup and repository layout, see [Connect through GitHub or Bitbucket Cloud](https://docs.meetsilicon.com/semantic-layer/yaml.md#connect-through-github).
* **Username:** your Bitbucket username, with the exact capitalization shown in your Bitbucket personal settings. Use the username, not your email address.
* **API Token:** the token created above.
* **Repository:** the workspace and repository slug, such as `my-workspace/analytics`. Do not enter the full URL.
* **Branch:** the branch Silicon syncs from, such as `main`. Writeback opens a separate change branch and targets this configured branch.
* **Project directory path:** the directory containing `dbt_project.yml` for dbt, or `silicon.config.yml` and your model directory for native YAML. Use `/` for the repository root.
* **Host domain:** for dbt, leave blank for Bitbucket Cloud or use `bitbucket.org`. Native YAML uses `bitbucket.org` automatically and hides this field.

Save the connection. For dbt, complete the [dbt project settings](https://docs.meetsilicon.com/integrations/dbt/projects.md#dbt-project-settings). For the available writeback actions, see [dbt write-back](https://docs.meetsilicon.com/integrations/dbt/write-back.md) and [AI writeback](https://docs.meetsilicon.com/agents/ai-writeback.md).

#### Updating credentials

If the token expires or is revoked, create a replacement with the required permissions and update **API Token** in the project's connection settings. A token that can sync but cannot write back may be missing writeback scopes or repository permissions.

When changing the repository, host, or username, provide credentials for the new destination. Silicon does not carry the stored token over to a different credential destination.

#### Bitbucket Server and Data Center

For a company-hosted Bitbucket instance, use an [HTTP access token](https://confluence.atlassian.com/bitbucketserver/http-access-tokens-939515499.html) with **Project read** and **Repository read**, and enter your instance's **Host domain**. These connections support reading the dbt project; Bitbucket writeback supports Cloud only. Here, "Cloud" means the Git host is `bitbucket.org`.

***

### dbt Cloud

The dbt Cloud connection type bypasses any git connection, instead directly accessing metadata from your dbt Cloud project using the dbt Cloud API.

This means a number of features are **not** available, including:

* [dbt write-back features](https://docs.meetsilicon.com/integrations/dbt/write-back.md)
* [Preview environments](https://docs.meetsilicon.com/workflow/preview-projects.md#silicon-app) created in the UI from git branches
* Automatic refreshes on new commits to your git repo - you'll need to manually trigger refreshes in Silicon when you make changes to your dbt project.

> [!NOTE]
>
> **MetricFlow metrics are translated automatically.** If your dbt project defines [MetricFlow](https://docs.getdbt.com/docs/build/about-metricflow) semantic models and metrics, Silicon pulls them from the dbt Cloud Discovery API on each refresh and translates the supported ones into Silicon metrics -- no dbt Semantic Layer configuration needed. See [dbt MetricFlow metrics](https://docs.meetsilicon.com/integrations/dbt/metricflow.md#using-the-dbt-cloud-connection) for what translates and for dbt Cloud-specific limitations.

##### Service Token

To connect Silicon to your dbt Cloud project, you'll need to create a [dbt Cloud service token](https://docs.getdbt.com/docs/dbt-cloud-apis/service-tokens) with the 'Metadata Only' and 'Job Viewer' permissions.

##### Environment ID

This is the identifier for your dbt Cloud environment. You can find this in the URL when you're in your dbt Cloud environment. Silicon will use this to identify which environment it should be built from, so commonly you'll point to your production environment here.

##### Webhook for dbt

This webhook is an optional extra for those using the dbt Cloud CI steps. If you set up a webhook in dbt Cloud that triggers when a job completes, paste the webhook address into dbt Cloud and Silicon will automatically spin up a preview for the given CI environment.

Follow the [dbt Cloud webhooks guide](https://docs.getdbt.com/docs/deploy/webhooks) to create a webhook that fires on job completion, and set the endpoint URL to the value shown in this field.

##### Webhook secret

Optional, but recommended if you configure the webhook above. When you create the webhook in dbt Cloud, dbt Cloud generates a signing secret -- paste that secret here so Silicon can verify the HMAC signature on each incoming webhook and confirm the request genuinely came from dbt Cloud.

* The secret is stored encrypted and is stripped from API responses, so it never appears in project payloads returned by the Silicon API.
* Leaving this field blank preserves the previous behaviour: webhook requests are accepted without signature verification (backwards compatible).
* If you edit the project without re-entering the secret, the existing value is preserved.

##### Discovery API Endpoint

The dbt Cloud metadata API host for your region. Must use `https://`. Match it to your dbt Cloud access URL:

* US multi-tenant: `https://metadata.cloud.getdbt.com`
* EU multi-tenant: `https://metadata.eu1.dbt.com`
* Cell-based (URL like `abc123.us1.dbt.com`): `https://<prefix>.metadata.us1.dbt.com`

***

### CLI&#x20;

The `CLI` connection type is the default type for projects that were created using the CLI via the `silicon deploy --create` command.

Usually, we recommend swapping to a direct connection to your git repo after initial project creation, but if you want to continue managing deployments in the CLI, [read this guide on how to use Silicon deploy and set up continuous deployment](https://docs.meetsilicon.com/workflow/cli/deploy.md).

***

### Local dbt project

> [!WARNING]
>
> Unsuitable for production and only available for Silicon instances installed on your local machine

To start Silicon with the option to connect to a local dbt project, you must specify the directory of the dbt project when you start docker compose:

```yaml theme={null}
# Specify the absolute path to your dbt project
# e.g. export DBT_PROJECT_DIR=/Users/jake/mydbtproject
export DBT_PROJECT_DIR= # Enter your path here!
docker compose start
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.