Skip to main content

data_masking_rules

Creates, updates, deletes, gets or lists a data_masking_rules resource.

Overview

Namedata_masking_rules
TypeResource
Idazure.synapse.data_masking_rules

Fields

NameDatatypeDescription
idtextfield from the properties object
alias_nametextfield from the properties object
column_nametextfield from the properties object
dataMaskingPolicyNametextfield from the properties object
dataMaskingRuleNametextfield from the properties object
kindtextThe kind of Data Masking Rule. Metadata, used for Azure portal.
locationtextThe location of the data masking rule.
masking_functiontextfield from the properties object
number_fromtextfield from the properties object
number_totextfield from the properties object
prefix_sizetextfield from the properties object
replacement_stringtextfield from the properties object
resourceGroupNametextfield from the properties object
rule_statetextfield from the properties object
schema_nametextfield from the properties object
sqlPoolNametextfield from the properties object
subscriptionIdtextfield from the properties object
suffix_sizetextfield from the properties object
table_nametextfield from the properties object
workspaceNametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTdataMaskingPolicyName, dataMaskingRuleName, resourceGroupName, sqlPoolName, subscriptionId, workspaceNameGets the specific Sql pool data masking rule.
list_by_sql_poolSELECTdataMaskingPolicyName, resourceGroupName, sqlPoolName, subscriptionId, workspaceNameGets a list of Sql pool data masking rules.
create_or_updateINSERTdataMaskingPolicyName, dataMaskingRuleName, resourceGroupName, sqlPoolName, subscriptionId, workspaceNameCreates or updates a Sql pool data masking rule.

SELECT examples

Gets a list of Sql pool data masking rules.

SELECT
id,
alias_name,
column_name,
dataMaskingPolicyName,
dataMaskingRuleName,
kind,
location,
masking_function,
number_from,
number_to,
prefix_size,
replacement_string,
resourceGroupName,
rule_state,
schema_name,
sqlPoolName,
subscriptionId,
suffix_size,
table_name,
workspaceName
FROM azure.synapse.vw_data_masking_rules
WHERE dataMaskingPolicyName = '{{ dataMaskingPolicyName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND sqlPoolName = '{{ sqlPoolName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND workspaceName = '{{ workspaceName }}';

INSERT example

Use the following StackQL query and manifest file to create a new data_masking_rules resource.

/*+ create */
INSERT INTO azure.synapse.data_masking_rules (
dataMaskingPolicyName,
dataMaskingRuleName,
resourceGroupName,
sqlPoolName,
subscriptionId,
workspaceName,
properties
)
SELECT
'{{ dataMaskingPolicyName }}',
'{{ dataMaskingRuleName }}',
'{{ resourceGroupName }}',
'{{ sqlPoolName }}',
'{{ subscriptionId }}',
'{{ workspaceName }}',
'{{ properties }}'
;