The problem I’m having
I am trying to create secure views in Snowflake utilizing models from the models/marts, models/staging and models/intermediate
folders.
The context of why I’m trying to do this
Column level access restriction for various services utilizing Snowflake data.
What I’ve already tried
- Created a
models/secure_views
folder containing.sql
files for model definitions such asmy_secure_view.sql
below:
{{
config(
materialized='view',
secure=true,
grants = {'+select': ['my_service_role']}
)
}}
select
id,
value,
from {{ ref('my_model') }}
and YAML file, secure_views.yml
, with model descriptions:
version: 2
models:
- name: my_secure_view
description: >
This secure view is used by the my_service_role to expose a limited set of columns from the underlying table(s).
Resulting error messages
FAIL 4 is_empty_fct_model_naming_conventions
FAIL 4 is_empty_fct_missing_primary_key_tests
FAIL 1 is_empty_fct_model_fanout