set_column_mask
Apply or replace a dynamic data mask on a column in a Microsoft Fabric warehouse or SQL endpoint, supporting default, email, random, and partial masks to protect sensitive data.
Instructions
Apply or replace a dynamic data mask on a column.
Executes ALTER TABLE ... ALTER COLUMN ... ADD MASKED WITH (FUNCTION = '...').
ADD MASKED replaces any existing mask on the column without error.
Blocked by FABRIC_MCP_READONLY.
Supported mask function types:
"default"-- full masking; no extra args."email"-- email masking (exposes first char and".com"suffix); no extra args."random"-- numeric random mask; requires start and end."partial"-- custom string partial mask; requires prefix, padding, and suffix.
Args:
workspace: Workspace name or GUID.
item: Warehouse or SQL endpoint name or GUID.
table_schema: Schema name of the target table.
table_name: Name of the target table.
column_name: Name of the column to mask.
fn_type: Mask function type -- "default", "email", "random",
or "partial" (case-insensitive).
start: Lower bound for random() masking (required when fn_type is
"random"). Must be <= end.
end: Upper bound for random() masking (required when fn_type is
"random").
prefix: Leading characters to expose for partial() masking (required
when fn_type is "partial").
padding: Replacement padding string for partial() masking (required
when fn_type is "partial"). Must not contain ", ),
;, --, control characters (including U+0085, U+2028,
U+2029), and must not exceed 128 characters.
suffix: Trailing characters to expose for partial() masking (required
when fn_type is "partial").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | ||
| item | Yes | ||
| start | No | ||
| prefix | No | ||
| suffix | No | ||
| fn_type | Yes | ||
| padding | No | ||
| workspace | Yes | ||
| table_name | Yes | ||
| column_name | Yes | ||
| table_schema | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||