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

# Snowflake semantic views

> Import and query Snowflake semantic views directly in Omni

Omni's Snowflake semantic view integration lets you use Snowflake's semantic layer directly within Omni. When enabled, Omni imports your semantic views and preserves the field definitions, allowing you to keep your semantic definitions in one place — Snowflake — while giving you access to Omni's exploration and visualization features.

## Benefits

<Columns cols={1}>
  <Card title="Consistency" icon="check-double" horizontal>
    Metric logic lives in Snowflake and doesn't need to be replicated in Omni. Changes to semantic views in Snowflake automatically reflect in Omni after a schema refresh.
  </Card>

  <Card title="Simplified governance" icon="lock" horizontal>
    Access control is managed through Snowflake grants, maintaining a single source of truth for business metrics and dimensions.
  </Card>
</Columns>

## How it works

When the semantic view integration is enabled, Omni:

1. Imports each Snowflake semantic view as a single folder in the Omni model, with a view file for each underlying table
2. Preserves all fields defined in the semantic view, including dimensions and measures

## Requirements

To follow the steps in this guide, you'll need:

* Semantic views created in your Snowflake account
* **Organization Admin** or **Connection Admin** permissions on the Snowflake connection in Omni. This is required to modify the connection's settings.
* An existing [Snowflake connection in Omni](/connect-data/setup/snowflake)

## Setup

<Steps>
  <Step title="Grant database permissions" titleSize="h3">
    Grant the Omni database user read access to your semantic views. Semantic views use the same grant structure as regular views:

    ```sql title="Snowflake semantic view user grants" theme={null}
    GRANT USAGE ON DATABASE your_database TO ROLE omni_role;
    GRANT USAGE ON SCHEMA your_database.your_schema TO ROLE omni_role;
    GRANT SELECT ON SEMANTIC VIEW your_database.your_schema.your_semantic_view TO ROLE omni_role;
    ```

    If you've already granted access to all views in the schema as part of your [Snowflake connection setup](/connect-data/setup/snowflake), no additional grants are needed.
  </Step>

  <Step title="Include the schema in your connection" titleSize="h3">
    In your Omni connection settings, make sure the schema containing your semantic views is included:

    1. Navigate to **Settings > Connections** and click your Snowflake connection.
    2. Verify that the schema is listed in the **Include Other Databases** or default database configuration.

    <Note>
      If this is the first time the schema is being used, you need to explicitly activate it during initial setup. Include it in your connection's schema configuration to trigger first-time generation.
    </Note>
  </Step>

  <Step title="Enable the semantic view settings" titleSize="h3">
    In your Omni connection settings, scroll to the bottom of the page and enable the **Enable DW Semantic View Integration** setting. This will make semantic views available in workbooks and the model IDE. Without this setting, semantic views won't be visible.
  </Step>

  <Step title="Update and refresh the connection" titleSize="h3">
    1. Click **Update and Test Connection** to save your connection settings and verify the connection.
    2. Trigger a [**Schema Refresh**](/modeling/develop/schema-refreshes) to update the model associated with this connection.

    After the refresh completes, your semantic views will appear as view objects in the model.
  </Step>
</Steps>

## Working with semantic views

Once imported, your semantic views will appear in the Omni model, with a folder for each semantic view. Each folder will contain a view file for each underlying table. From here, you can:

* Build workbooks directly from semantic view fields
* Combine dimensions and measures in analyses
* Create joins to other tables and views
* Create measures and transformations on top of semantic views within Omni
* Use Omni's visualization features with your semantic layer data

### Best practices

<Columns cols={1}>
  <Card title="Manage relationships in Snowflake" icon="handshake" horizontal>
    Define all joins and relationships within your Snowflake semantic view definitions. Update them in Snowflake rather than creating relationships in Omni.
  </Card>

  <Card title="Keep metric logic centralized" icon="arrows-to-circle" horizontal>
    When you need new metrics, add them to the semantic view in Snowflake rather than duplicating logic in Omni. This maintains a single source of truth.
  </Card>
</Columns>

### Limitations

There are a few known edge cases that are currently being investigated:

* Handling semantic views with multiple fact tables
* Custom SQL generation patterns for semantic view queries

Omni is actively working with Snowflake to understand which limitations may be addressed in future releases.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Semantic view not appearing after sync">
    * Verify the schema containing the semantic view is included in your [connection's schema configuration](#include-the-schema-in-your-connection).
    * Confirm that the [Omni database user](#grant-database-permissions) has the correct grants on the semantic view.
    * Check that [**Enable DW Semantic View Integration**](#enable-the-semantic-view-settings) is turned on in the connection settings.
  </Accordion>

  <Accordion title="Query errors with measures">
    * Make sure you're using the `AGG()` syntax for metrics defined in your Snowflake semantic view.
    * Verify the measure exists in the Snowflake semantic view definition.
    * Some query patterns may have compatibility issues — check for non-unique field names across dimensions and measures.
  </Accordion>

  <Accordion title="Unable to create expected analysis">
    Review your semantic view definition in Snowflake for missing relationships or fields.
  </Accordion>
</AccordionGroup>

## Next steps

* [Schema restriction](/connect-data/schema-restriction) — Control which schemas are included in your model
* [Topics overview](/modeling/topics) — Learn about topics and how they organize data for exploration
