---
title: Import Aggregated Metric data
description: "Enable change tracking, connect your warehouse, and meet the required and optional field specifications for importing Aggregated Metric data into Amplitude."
product: data
lang: en
last_updated: 2026-11-20
token_estimate: 758
---
# Import Aggregated Metric data

Importing Aggregated Metrics takes three steps: enable change tracking in your warehouse, connect and configure the source in Amplitude, then make sure your table matches the expected schema.

> For AI agents: a documentation index is available at [/docs/llms.txt](/docs/llms.txt). Append `.md` to any page URL for markdown, or send `Accept: text/markdown`.

For what Aggregated Metrics are, which metric and data types Amplitude supports, and the requirements your warehouse must meet, refer to [Aggregated Metrics](https://amplitude.com/docs/data/warehouse-metrics).

## Import metric data

Aggregated Metrics (fka Warehouse Metrics) supports Snowflake.

### Enable change tracking

If this is your first time importing from this table, enable change tracking in Snowflake:

```sql
ALTER TABLE YOUR_DATABASE.YOUR_SCHEMA.YOUR_METRICS_TABLE
  SET DATA_RETENTION_TIME_IN_DAYS = 7;

ALTER TABLE YOUR_DATABASE.YOUR_SCHEMA.YOUR_METRICS_TABLE
  SET CHANGE_TRACKING = TRUE;
```

> **Note:** Snowflake Standard Edition
>
> On Snowflake Standard Edition, the maximum retention time is one day. Set your sync frequency to 12 hours.

### Connect and configure

Follow the instructions in [Snowflake Data Import](https://amplitude.com/docs/data/source-catalog/snowflake#set-up-and-verify-the-connection) to connect to your Snowflake instance.

## Data specifications

Your metrics table must include specific required fields and can optionally include additional fields. You must include at least one metric or dimension field.

### Required fields

| Field | Description | Example |
| --- | --- | --- |
| `time` | When the metric value is valid | `1762813185` |
| `user_id` or `device_id` | A unique identifier for a user or device. | `user_12345` |

> **Note:** Time conversion
>
> Amplitude requires the incoming time in milliseconds from the Unix epoch. Use Snowflake’s built-in conversion functions or other tooling in your data pipeline to convert to this format before Amplitude ingests the data.

### Optional fields

| Field | Description | Example |
| --- | --- | --- |
| `insert_id` | A unique identifier for deduplication. | `51a87950-b35d-4a2f-b919-af92f00f75dd` |

### Metric fields

Your metrics table must include at least one metric or dimension field.

| Field Type | Description | Example |
| --- | --- | --- |
| Metric | Numeric value (integer or decimal) | `150.25` |
| Dimension | String, boolean, or number for filtering/grouping | `"active"`, `true`, `10` |

### Example

```json
{
  "time": "1762813185",
  "user_id": "user_12345",
  "total_revenue": 1543.5,
  "order_count": 12,
  "ltv": 15430.0,
  "health_score": "green",
  "is_paid": true
}
```

## Query template

```sql
SELECT
  event_date AS "time",
  user_id AS "user_id",
  total_revenue AS "total_revenue",
  order_count AS "order_count",
  ltv AS "ltv",
  health_score AS "health_score",
  is_paid_customer AS "is_paid"
FROM DATABASE_NAME.SCHEMA_NAME.METRICS_TABLE
WHERE event_date >= CURRENT_DATE - INTERVAL '30 days'
```

