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

# Bring your own warehouse

> How Kubit queries agent traces and clickstream events in place in your Snowflake, BigQuery, Databricks, ClickHouse or Redshift.

Kubit queries traces and events where they already live, in your Snowflake, BigQuery, Databricks, ClickHouse or Redshift. Nothing is copied out of your account. No data silo to secure. Traces retained in your control.

## How Kubit connects to your warehouse

Kubit connects to your warehouse with a dedicated, read-only identity that you create for it. Every setup page follows the same pattern:

| Part | What you create | Why |
| - | - | - |
| **Identity** | A Kubit user, role, service account or service principal | Kubit signs in as this identity and nothing else |
| **Read access** | `SELECT` on the schemas, tables or views Kubit should query | Kubit only reads the data you grant |
| **Compute** | A warehouse sized for Kubit, on Snowflake and Databricks | Kubit's queries run on compute you control and can monitor |
| **Auxiliary database** | A small database Kubit owns, on Snowflake (`KUBIT`) and ClickHouse (`KUBIT_DB`) | Kubit keeps auxiliary tables and views there to support some features |
| **Network access** | Kubit's IP ranges in your firewall, or VPC access on Redshift | Only Kubit can reach the warehouse from outside your network |

## Supported warehouses

| Warehouse | Kubit signs in with | Setup page |
| - | - | - |
| Snowflake | A `KUBIT` user with key pair auth | [Connect Snowflake](https://learn.kubit.ai/warehouses/snowflake.md) |
| BigQuery | A `Kubit` service account with a JSON key | [Connect BigQuery](https://learn.kubit.ai/warehouses/bigquery.md) |
| Databricks | A service principal on a Serverless SQL warehouse | [Connect Databricks](https://learn.kubit.ai/warehouses/databricks.md) |
| ClickHouse | A `KUBIT` user with `KUBIT_R` and `KUBIT_W` roles | [Connect ClickHouse](https://learn.kubit.ai/warehouses/clickhouse.md) |
| Redshift | A `kubit` user, reached through VPC access | [Connect Amazon Redshift](https://learn.kubit.ai/warehouses/redshift.md) |

For agent traces, the **Warehouse** origin in **Create Workspace** lists Databricks, Snowflake, BigQuery and ClickHouse. [Set up your organization](https://learn.kubit.ai/start-here/admin.md#steps) walks through creating that workspace.

## Your warehouse or Kubit compute

A workspace reads data from your own warehouse or from a Kubit-hosted one.

## Keep Kubit's queries fast and cheap

Kubit's queries filter on time and event name, so the same two choices help on every warehouse.

| Practice | Where it's covered |
| - | - |
| Cluster, partition or sort fact tables by event date, then by event name | [Snowflake](https://learn.kubit.ai/warehouses/snowflake.md#clustering-keys), [Databricks](https://learn.kubit.ai/warehouses/databricks.md#partitioning), [Redshift](https://learn.kubit.ai/warehouses/redshift.md#sort-and-distribution-keys) |
| Start with the smallest compute and size up only when query history shows spilling or queuing | [Snowflake](https://learn.kubit.ai/warehouses/snowflake.md#warehouse-configuration), [Databricks](https://learn.kubit.ai/warehouses/databricks.md#warehouse-configuration) |
| Use a separate identity and compute for development | The optional last step of each setup page |

## Related

* [Allow Kubit's IP ranges](https://learn.kubit.ai/warehouses/ip-allowlist.md): the current ranges and how to keep firewall rules up to date.
* [Set up your organization](https://learn.kubit.ai/start-here/admin.md): create a workspace on your warehouse.


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