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

# Snowflake Billing Setup

> Connect Snowflake account usage and billing data to Costory using key-pair authentication and a reusable Snowflake integration.

Snowflake billing ingestion uses a **Snowflake integration** you create once on the **Integrations** page, then attach to a billing datasource. Authentication is **key-pair** (RSA): Costory shows a **public** key for your Snowflake user; the **private** key is stored securely and is never returned after you save.

<Tabs>
  <Tab title="Terraform">
    Not supported yet.
  </Tab>

  <Tab title="Manual setup">
    ### 1. Create the Snowflake integration

    1. Open Costory and go to **Integrations**.
    2. Start the flow to add a **Snowflake** integration.
    3. When Costory displays **setup SQL** and a generated **public RSA key**, copy them.
    4. In the Snowflake console (or worksheet), run the setup SQL as a user who can alter the login for the Snowflake user Costory will use. This registers the public key for key-pair authentication.
    5. Enter the Snowflake connection details Costory asks for (for example account identifier, user, role, and warehouse as shown in the stepper).
    6. Complete validation. Costory checks access through the **Snowflake SQL API** before any sync is enabled.

    ### 2. Enable Snowflake billing

    1. Go to **Billing** > **Import new billing datasource** > **Snowflake**.
    2. Select the **Snowflake integration** you created above.
    3. Finish the stepper. Costory provisions the billing sync and starts ingesting data.

    First sync timing is similar to other SaaS billing sources (on the order of **minutes**). See [Data refresh](/docs/data-refresh) for ongoing cadence.
  </Tab>
</Tabs>

**What Costory includes**

* **Usage-based cost data** from Snowflake account usage (including views such as **USAGE\_IN\_CURRENCY\_DAILY**), with **warehouse** and **query** history where the connector exposes them for allocation and analysis. **Query tags** are included when Snowflake provides them, so query-level costs appear with tag dimensions you can use to filter and group in [Explorer](/features/cost-explorer).

**What Costory does not include**

* **Terraform** automation for this datasource (use the UI only until Terraform support ships).

<Info>
  To remove access, delete or rotate credentials from the Costory UI and adjust Snowflake users and keys on your side. You cannot archive a Snowflake integration while an active billing datasource still references it.
</Info>

## Related

* [Billing Data](/setup/billing): overview of all billing sources
* [Standard Columns](/docs/standard-columns): normalized cost fields across providers
* [Explorer](/features/cost-explorer): explore ingested costs after sync
