Package dev.frostlake.metastore.model
Class MaskingPolicy
java.lang.Object
dev.frostlake.metastore.SqlObject
dev.frostlake.metastore.model.MaskingPolicy
- All Implemented Interfaces:
Taggable
Snowflake MASKING POLICY — transforms a column value based on the querying user's role.
The policy body is a SQL expression that receives the column value and returns the masked value.
Example: CREATE MASKING POLICY email_mask AS (val STRING) RETURNS STRING ->
CASE WHEN CURRENT_ROLE() IN ('ANALYST') THEN val ELSE '***MASKED***' END;
-
Field Summary
Fields inherited from class dev.frostlake.metastore.SqlObject
comment, createdTime, name, owner -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBody()Get the type of this SQL object (e.g., "TABLE", "VIEW", "DATABASE") Subclasses should override to provide their specific typeMethods inherited from class dev.frostlake.metastore.SqlObject
equals, getComment, getCreatedTime, getName, getOwner, getTagValue, getTagValues, hashCode, rename, setComment, setName, setOwner, setTag, toString, unsetTag, withoutTrailingSemicolon
-
Constructor Details
-
MaskingPolicy
-
-
Method Details
-
getParameters
-
getReturnType
-
getBody
-
getObjectType
Description copied from class:SqlObjectGet the type of this SQL object (e.g., "TABLE", "VIEW", "DATABASE") Subclasses should override to provide their specific type- Specified by:
getObjectTypein classSqlObject- Returns:
- The object type as a string
-