[Feature] Add the ability to create tables and views with a row access policy. #1224
Open
3 tasks done
Labels
enhancement
New feature or request
Is this your first time submitting a feature request?
Describe the feature
I would like to be able to specify a row access policy to apply to a table or view when it is created. For example add a config option such as row_access_policy where you would specify the policy name and the column that it applies to.
{{
config(
row_access_policy='test_db.security.tenant_row_access__policy ON (tenantid)'
)
}}
When the table or view is compiled the resulting code would look like
CREATE TABLE
test_db.published.SalesData
WITH ROW ACCESS POLICY test_db.security.tenant_row_access__policy ON (tenantid)
AS ( ...
Describe alternatives you've considered
I've considered using a post hook to apply the row access policy after the table has been created. The problem with this approach is that there is a slight delay after the table has been created and before the row access policy has been applied where all of the data is exposed to the consumer. This is not a viable option as it exposes sensitive data.
Who will this benefit?
Anyone who uses row access policies in Snowflake.
Are you interested in contributing this feature?
I would be willing to test any changes, I'm not sure that I have the ability to make the changes.
Anything else?
No response
The text was updated successfully, but these errors were encountered: