Stay organized with collections
Save and categorize content based on your preferences.
This page explains how to mask sensitive data when you prepare data in the
Wrangler workspace of the Cloud Data Fusion Studio. You can mask data in
columns of any data type, except boolean and bytes types.
On the Data tab, go to a column name and click the
arrow_drop_down
expander arrow.
Select Mask, and select an option—for example, Custom selection. The
options are explained in the following sections.
The transformation is applied to the Preview data shown on Data tab of the
Wrangler workspace. Wrangler adds a masking directive to the recipe. When you
run the data pipeline, the transformation is applied to all values in the
column.
Show the last four characters only
The Show the last 4 characters only masking option adds the mask-number
directive as a transformation step to the recipe.
Show the last two characters only
The show the last 2 characters only masking option adds the mask-number
directive as a transformation step to the recipe.
Custom selection
The Custom selection masking option lets you select the position of the
characters to mask in a cell and masks similarly positioned characters in each
row of the column. For example, in a cell that contains a 10-character string,
selecting the first 8 characters of the string causes the first 8 characters to
be masked in each row of the column.
On the Data tab, go to a column name and click the
arrow_drop_down
expander arrow.
Select Mask > Custom selection. The column values that you
can mask appear with a blue background.
In any cell of the column, select the characters to mask.
Click Apply.
That portion of the value is masked for all fields in the column.
Custom selection adds the mask-number directive to the recipe. When you run
the data pipeline, the transformation is applied to all values in the column.
By shuffling
The By shuffling masking option applies a random masking pattern to each
field in the column. Wrangler adds the mask-shuffle directive as a
transformation step to the recipe.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-03 UTC."],[[["\u003cp\u003eThis guide outlines how to mask sensitive data within the Wrangler workspace of Cloud Data Fusion Studio, applicable to columns of most data types, excluding boolean and bytes.\u003c/p\u003e\n"],["\u003cp\u003eData masking is done by selecting the 'Mask' option within a column, with choices like 'Show the last 4 characters only', 'Show the last 2 characters only', or 'Custom selection'.\u003c/p\u003e\n"],["\u003cp\u003e'Custom selection' allows you to pinpoint specific characters within a cell to mask, with this masking pattern then applied uniformly across all rows in the column.\u003c/p\u003e\n"],["\u003cp\u003eThe 'By shuffling' option applies a random masking pattern to each field in the column.\u003c/p\u003e\n"],["\u003cp\u003eApplying a masking option adds a corresponding directive (like \u003ccode\u003emask-number\u003c/code\u003e or \u003ccode\u003emask-shuffle\u003c/code\u003e) to the Wrangler recipe, ensuring the transformation affects all column values during data pipeline execution.\u003c/p\u003e\n"]]],[],null,["# Mask data\n\nThis page explains how to mask sensitive data when you prepare data in the\nWrangler workspace of the Cloud Data Fusion Studio. You can mask data in\ncolumns of any data type, except boolean and bytes types.\n\n1. [Go to Wrangler workspace in Cloud Data Fusion](/data-fusion/docs/concepts/wrangler-overview#navigate-to-wrangler).\n2. On the **Data** tab, go to a column name and click the arrow_drop_down expander arrow.\n3. Select **Mask** , and select an option---for example, **Custom selection**. The options are explained in the following sections.\n\nThe transformation is applied to the Preview data shown on Data tab of the\nWrangler workspace. Wrangler adds a masking directive to the recipe. When you\nrun the data pipeline, the transformation is applied to all values in the\ncolumn.\n\nShow the last four characters only\n----------------------------------\n\nThe **Show the last 4 characters only** masking option adds the `mask-number`\ndirective as a transformation step to the recipe.\n\nShow the last two characters only\n---------------------------------\n\nThe **show the last 2 characters only** masking option adds the `mask-number`\ndirective as a transformation step to the recipe.\n\nCustom selection\n----------------\n\nThe **Custom selection** masking option lets you select the position of the\ncharacters to mask in a cell and masks similarly positioned characters in each\nrow of the column. For example, in a cell that contains a 10-character string,\nselecting the first 8 characters of the string causes the first 8 characters to\nbe masked in each row of the column.\n\nTo select specific characters to mask:\n\n1. [Go to Wrangler workspace in Cloud Data Fusion](/data-fusion/docs/concepts/wrangler-overview#navigate-to-wrangler).\n2. On the **Data** tab, go to a column name and click the arrow_drop_down expander arrow.\n3. Select **Mask \\\u003e Custom selection**. The column values that you can mask appear with a blue background.\n4. In any cell of the column, select the characters to mask.\n5. Click **Apply**.\n\nThat portion of the value is masked for all fields in the column.\n\nCustom selection adds the `mask-number` directive to the recipe. When you run\nthe data pipeline, the transformation is applied to all values in the column.\n\nBy shuffling\n------------\n\nThe **By shuffling** masking option applies a random masking pattern to each\nfield in the column. Wrangler adds the `mask-shuffle` directive as a\ntransformation step to the recipe.\n\nWhat's next\n-----------\n\n- Learn more about [Wrangler directives](/data-fusion/docs/concepts/wrangler-overview#apply_directives)."]]