On this page
Table of Contents | ||||
---|---|---|---|---|
|
Overview
Use this Snap to hide sensitive information in your dataset before you export the dataset for analytics. With the Mask Snap, you can ensure sensitive data protection by using masking algorithms that the Snap provides out of the box.
Snap Input and Output
Input/Output | Type of View | Number of Views | Compatible Upstream and Downstream Snaps | Description |
---|---|---|---|---|
Input | Document |
|
| A dataset where some of the data must be masked. |
Output | Document |
|
| A dataset where the specified data is masked. |
Snap Settings
Parameter Name | Data Type | Description | Default Value | Example | ||
---|---|---|---|---|---|---|
Label | String | Required. The name for the Snap. Modify this to be more specific, especially if there is more than one of the same Snap in the Pipeline. | N/A | Mask | ||
Mask Policy | N/A | Required. Enables you to specify the policies that you want to use to mask data in the input dataset. | N/A | N/A | ||
Field | String | The field/parent field in the input dataset that contains the data to be masked. | N/A | name | ||
Search Mode | N/A | The mode the Snap must use to search sensitive data. Select from the following options:
For example, if you want to mask | N/A | Exact Path | ||
Match Field | String | The type of field in the input data to be matched. Select from the following options:
| N/A | Value | ||
Match Condition | N/A | The match condition that determines whether the Match Field should be matched. For example, if your input dataset contains $credit_card Field and you enter the Match Field as Value and Match Condition as Number, then the Snap masks all $credit_card fields that contain a number as the value. If the field contains text as the value, then the Snap skips masking that value. Select from the following options:
| N/A | Date | ||
Match Pattern | String | The expression of the information pattern to be matched in the input dataset. This is applicable only when the Match Condition is Regex Match or Date (Text). | N/A | Hello | ||
Mask Field | N/A | The field that contains sensitive data and will be masked if the matching conditions are met. Select from the following options:
| N/A | Value | ||
Mask Method | N/A | The method to use to mask sensitive information. Select from the following options:
| N/A | Remove | ||
Mask Value |
| The value that must replace the sensitive information in the input dataset. You can enter either a fixed value or an expression. This is applicable only when the Mask Method is Replace. | N/A | 0 | ||
Execute during preview | N/A | Specify the execution type from the following options:
| Validate & Execute | Validate & Execute |
Example
This Pipeline demonstrates how the Mask Snap helps you hide sensitive information in a dataset. In this example, the input dataset is a demographic of the Oscar award winners. We want to pass on the dataset to a third party for some analytics. However, before we pass on the data, we want to hide sensitive information from the dataset. We use the Mask Snap to identify and replace/remove all sensitive information from the Oscar award winners list. While the dataset here is public data, you can apply the masking policies that the Mask Snap provides to hide confidential or sensitive data from your organization.
Download the Pipeline.
Expand | ||
---|---|---|
| ||
The dataset is derived from Kaggle and is a demographic of Oscar award winners in the Best Director category from 1927 through 1976. The input document is picked up using the File Reader Snap and is passed through the CSV Parser Snap. A preview of the dataset in CSV format is as follows: The dataset is passed to the Mask Snap to hide sensitive data. In this example, we want to mask the following fields:
For this purpose, the Mask Snap is configured as follows: We have added three rows under Mask Policy, and each row enables us to mask one of the fields discussed above. The first row under Mask Policy enables us to mask the The second row under Mask Policy enables us to mask the In Recursive mode, you can mask multiple fields at a time depending on the condition specified. For example, if you think your data is nested, or in an array, and that you cannot specify the exact path, you can use Recursive mode. In this example, we are not sure how many fields contain URLs. Hence, we use recursive mode to mask all field values that contain a URL. The third row under Mask Policy enables us to mask the name of the winner. We specify the Field as $person and select the Search Mode as Exact Path. The Match Field is Key and the Match Condition is Regex Match, and the Match Pattern is .* which matches any value that is entered in the $person field. The Mask Method is Replace and the Mask Field is Value. The Mask Value is Winner name is masked. The Snap replaces all After the dataset is passed through the Mask Snap and the different mask conditions are applied to it, the output dataset is as follows: In the output dataset preview, we can see that the The masked dataset output of the Mask Snap is then converted to CSV format using the CSV Formatter Snap and then passed to a File Writer Snap. |
...
See Also
...