CREATE DATA MOVEMENT POLICY

statementsupportedGovernance (policies, tags, data quality)Enterprise+

docs.snowflake.com ↗

Object: DATA MOVEMENT POLICY

Creates a new data movement policy in the current/specified schema or replaces an existing data movement policy. A data movement policy groups data movement rules into two lists: ENFORCE_RULES, which can block a data movement operation, and ALERT_RULES, which allow the operation and generate an alert. After you create a data movement policy, attach it to a tag with ALTER TAG or to the account with ALTER ACCOUNT.

Syntax

supportedpartialnot supportednot scored

CREATE [ OR REPLACE ] DATA MOVEMENT POLICY [ IF NOT EXISTS ] <name>
  [ ENFORCE_RULES = ( <rule_name> [ , <rule_name> , ... ] ) ]
  [ ALERT_RULES = ( <rule_name> [ , <rule_name> , ... ] ) ]
  [ COMMENT = '<string_literal>' ]

Parameters

NameRequiredDescription
namerequiredSpecifies the identifier for the data movement policy; must be unique for the schema in which the policy is created. In addition, the identifier must start with an alphabetic character and cannot contain spaces or special characters unless the entire identifier string is enclosed in double quotes (for example, "My object"). Identifiers enclosed in double quotes are also case-sensitive. For more information, see Identifier requirements.
ENFORCE_RULES = ( rule_name [ , rule_name , ... ] )optionalSpecifies the data movement rules that block a data movement operation when the operation matches a rule.
ALERT_RULES = ( rule_name [ , rule_name , ... ] )optionalSpecifies the data movement rules that allow a data movement operation and generate an alert when the operation matches a rule.
COMMENT = 'string_literal'optionalSpecifies a comment for the data movement policy. Default: No value

Usage notes

Access control requirements

A role used to execute this operation must have the following privileges at a minimum: Privilege | Object | Notes CREATE DATA MOVEMENT POLICY | Schema | To attach a data movement policy to a tag or to the account, the role must also have the APPLY DATA MOVEMENT POLICY privilege on the account. For details, see ALTER TAG and ALTER ACCOUNT. Operating on an object in a schema requires at least one privilege on the parent database and at least one privilege on the parent schema. For instructions on creating a custom role with a specified set of privileges, see Creating custom roles. For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.

See also

Referenced by