Build semantic layers in Snowflake and dbt MetricFlow with Claude Code
Watch Claude Code build the same revenue metrics as a Snowflake semantic view and as dbt MetricFlow definitions.
Who it's for: Data teams who want AI to answer business questions from their warehouse with the right numbers.
The problem: An AI model pointed at a database sees column names, not what revenue or an active customer means in your company. On the Spider 2.0 benchmark, models dropped from 91% accuracy on simple data to 21.3% on enterprise databases.
Without a semantic layer, two Claude Code sessions return different revenue numbers. Claude Code then builds a bundled Snowflake semantic view, queried through Cortex Analyst and the Snowflake MCP, and a standalone dbt MetricFlow project on the same TPC-H sample data.
Takeaways:
- Bundled layers like Snowflake semantic views need little setup but tie definitions to one platform.
- Standalone layers like dbt MetricFlow keep definitions portable, with more infrastructure to build.
- The dbt MCP semantic layer tools need dbt Cloud; locally, use the MetricFlow CLI.