This parameter supports Mustache rendering, allowing you to dynamically inject values such as user attributes. This parameter is useful for setting database session properties or configurations that need to be applied before queries run, particularly when those configurations need to vary based on user-specific attributes. All dialects are supported.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.
Syntax
Properties
A SQL statement to execute as a setup query before running SQL statements in the connection. Supports Mustache syntax for dynamic value injection, such as user attributes via
{{ omni_attributes.<attribute_name> }}. All dialects are supported.Examples
Omni automatically quotes user attributes when files are saved in the model IDE, meaning that the attribute value is always treated as a string. For example, even if the value of{{ omni_attributes.special_prop_name }} is numeric - like 5 or 102 - it’ll be treated as if it were "5" or "102":
Set a database property using a custom user attribute
IDENTIFIER to convert the quoted string:
Snowflake and Databricks - Use IDENTIFIER to convert the attribute value type