1. Define the business model
Identify the source tables, join keys, and the grain of the result. Check that the key on the dimension side is unique. Then define the relationships, dimensions, and metric expression in CREATE SEMANTIC VIEW.2. Query a metric by dimension
Select the metrics and dimensions by their model names in a semantic view query. For a first check, use the same filters and grouping as the equivalent query on the source tables.3. Verify the result and inspect the definition
Compare the rows and totals with the equivalent SQL. If the results differ, useEXPLAIN SNOWFLAKE to inspect the model relationships and EXPLAIN INLINE to see the expanded SQL. Use SHOW CREATE SEMANTIC VIEW to check the stored definition.
Follow the worked example to model and query order revenue by customer. To trace the tables and columns behind a model, see semantic view lineage.