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

# Define warehouse metrics | Human guide

> Have your agent define a reusable warehouse metric and check its meaning.

```deepline-prompt theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
/deepline-analytics Define [metric] in a test workspace. Compare its semantic query with direct SQL, then propose promoting the model.
```

The agent defines a small semantic model using the supported Snowflake connector and compares a representative semantic query with direct SQL for the same population.

Provide a connected Snowflake warehouse, a test org, one physical table with its identity column, a known query result, and a precise business definition.

Semantic queries read the stored model. Save the prior model, validate the proposed YAML, and save it in the test org before comparing queries. Promote the reviewed model only after the comparison passes.

> [!TIP]
>
> Compare the rendered SQL and returned values for the same population. Check automatic base filters and any joins, nulls and timezones. A successful YAML dry run does not establish warehouse table existence or metric correctness.

## Related guides

* [Semantic-layer reference](https://deepline.com/docs/semantic-layer-reference.md)

[Review and operate a workflow](https://deepline.com/docs/human/templates.md#review-and-operate-a-workflow) covers authorization, pilots, and recovery.

[Agent guide: CLI and SDK instructions →](https://deepline.com/docs/semantic-layer.md)


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