"Push the order_items view and its total_sale_price and sale_price_average measures to the dbt Semantic Layer"
## How the skill works
The skill:
1. **Reads the views, relationships, and (for a topic scope) the topic through the Omni API**. You choose the scope: a field list, a view, or a topic. The skill also adds the dependencies of each selected measure, such as a hidden dimension the measure filters on, and lists them for you.
2. **Translates them into MetricFlow YAML**. Includes semantic models (entities, dimensions, measures), `simple`, `ratio`, and `derived` metrics, and saved queries built from topic `default_filters` and `sample_queries`. It writes whichever spec your project already uses: legacy `semantic_models` with `measures`, or the flattened dbt 1.12 spec that defines aggregation on the metric.
3. **Checks your dbt project for existing names, writes the files, and validates them with `dbt parse` and `mf validate-configs`**. It then runs the same query with `mf query` and in Omni and confirms the numbers match.
4. **Runs a dbt sync on an Omni branch**. This imports the new YAML and removes the matching Omni model-extension override so dbt owns the definition. If the YAML is still on an unmerged dbt branch, the skill binds a non-production [dbt environment](/integrations/dbt/environments) to that branch before the sync.
The skill stops for your approval:
- Before it reads model definitions, to confirm the scope (fields, views, or topic)
- After it maps views to dbt models, to confirm the map, entities, relationships, and skips
- Before it writes to the dbt project
- Before it removes an Omni override
- Before it merges the Omni branch or opens a pull request for it
### What the skill skips
The skill reports and skips anything MetricFlow can't express:
- Views without a backing dbt model, such as CSV/input tables, derived tables, query views
- Joins with `where_sql`, inner or many-to-many semantics, or more than two hops
- Cross-view expressions and templated SQL
- `*_distinct_on` and `list` aggregations
- Relative time filters and period-over-period logic
- Table calculations in sample queries
<Tip>
Keep labels, formats, synonyms, and AI context in Omni while dbt owns the `sql` and aggregation. When Omni imports a dbt field with the same name as a model-extension field, it merges them key by key and the Omni key wins, so a label set in Omni survives the import.
</Tip>
### Definitions that differ between Omni and dbt
Three patterns can result in differences compared to Omni when converted to dbt. See [Known differences](/integrations/dbt/semantic-layer#known-differences-and-limitations) for the full explanation.
- **Filtered measures.** Where the filter is set dictates how MetricFlow applies it:
- A filter on the measure's own view goes inside the aggregation expression. A group with no matching rows stays present with the same value as Omni.
- A filter on a joined view becomes a metric `filter`. The group is dropped when the metric is queried alone and returns NULL when it is queried with other metrics. The skill reports this difference.
- **Week start day.** If the Omni model or topic sets a `week_start_day` that differs from MetricFlow's `week` grain, the skill reuses or adds a custom granularity on the dbt time spine so weekly results match.
- **Dimension `sql` overrides.** If a dimension has a model-extension `sql` override, the skill asks you to move that logic into the dbt model, inline it into the measure, or skip the measure. An inlined override applies twice in Omni until the fallback step removes the Omni override.
## Next steps
- Learn how a [dbt sync](/integrations/dbt/syncing-dbt) brings the new definitions into Omni
- Bind an Omni branch to a [dbt environment](/integrations/dbt/environments) when the YAML is still on a dbt branch
- Review the [known differences](/integrations/dbt/semantic-layer#known-differences-and-limitations) between dbt and Omni
- Resolve [dbt sync issues](/integrations/dbt/debugging-sync-issues)