Class MaskingPolicy

java.lang.Object
dev.frostlake.metastore.SqlObject
dev.frostlake.metastore.model.MaskingPolicy
All Implemented Interfaces:
Taggable

public class MaskingPolicy extends SqlObject
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;
  • Constructor Details

  • Method Details

    • getParameters

      public List<Parameter> getParameters()
    • getReturnType

      public String getReturnType()
    • getBody

      public String getBody()
    • getObjectType

      public String getObjectType()
      Description copied from class: SqlObject
      Get the type of this SQL object (e.g., "TABLE", "VIEW", "DATABASE") Subclasses should override to provide their specific type
      Specified by:
      getObjectType in class SqlObject
      Returns:
      The object type as a string