VIEW
Config path: /<database>/<schema>/view/<name>.yaml
Example:
Schema
columns (dict)
{key} (ident) - column name
{value} (str) - column comment
text (str) - view text
is_secure (bool) - is view secure
depends_on (list)
{items} (ident) - names of other views which this view depends on
comment (str)
Policy reference parameters
aggregation_policy (dict)
policy_name (ident) - name of AGGREGATION POLICY
columns (list)
{items} (ident) - optional reference column names defining "entity"
masking_policies (list)
{items} (dict)
policy_name (ident) - name of MASKING POLICY
columns (list)
{items} (ident) - reference column names
projection_policies (list)
{items} (dict)
policy_name (ident) - name of PROJECTION POLICY
column (ident) - reference column name
row_access_policy (dict)
policy_name (ident) - name of ROW ACCESS POLICY
columns (list)
{items} (ident) - reference column names
Usage notes
Invalid views will be re-created automatically, even if view definition remains exactly the same.
If you want to access objects from another database in VIEW definition, and if you want to preserve env prefix support for such views, please use the
env_prefix
placeholder. For example:${{ env_prefix }}db_name.schema_name.object_name
. You may access objects in the same database by omitting database name altogether.You may use custom YAML tag
!include
to store view SQL text in a separate file instead of storing it inside YAML.
Links
Last updated