# tDataUnmasking properties for Apache Spark Structured Streaming

[Preview](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Introduction/feature-preview-program-overview.htm)

These properties are used to configure tDataUnmasking running in the Spark Structured Streaming Job framework.

The Spark Structured Streaming tDataUnmasking component belongs to the Data Quality family.

This component is supported on Local Spark 3.5.x and Databricks/EMR with Spark 3.x.

Information noteNote: This component does not support dynamic schema.

This component is available in Talend Real-Time Big Data Platform and Talend Data Fabric.

## Basic settings

| Properties | Description |
| --- | --- |
| Schema and Edit Schema | <ul> <li> <p>A schema is a row description. It defines the number of fields            (columns) to be processed and passed on to the next component. When you create a Spark            Job, avoid the reserved word <kbd>line</kbd> when naming the            fields.</p> <p>Click <span>Sync        columns</span> to retrieve the schema from the previous component connected in the      Job.</p> <p>Click <span>Edit        schema</span> to make changes to the schema. If the current schema is of the <span>Repository</span> type, three options are available:</p> <ul> <li> <p> <span>View schema</span>: choose this                option to view the schema only.</p> </li> <li> <p> <span>Change to built-in property</span>:                choose this option to change the schema to <span>Built-in</span> for local changes.</p> </li> <li> <p> <span>Update repository connection</span>:                choose this option to change the schema stored in the repository and decide whether                to propagate the changes to all the Jobs upon completion.</p> <p>If you just want to                propagate the changes to the current Job, you can select <span>No</span> upon completion and choose this schema metadata                again in the <span>Repository Content</span>                window.</p> </li> </ul> <p>The output schema of this component contains one read-only column, <em>ORIGINAL_MARK</em>. This column identifies by <span>true</span> or <span>false</span> if the record is an original record or a substitute record respectively.</p> </li> <li> <p> <span>Built-In</span>: You create and store the schema locally for this component                only.</p> </li> <li> <p> <span>Repository</span>: You have already created the schema and stored it in the                Repository. You can reuse it in various projects and Job designs.</p> </li> </ul> |
| Modifications | Define in the table what fields to unmask and how to<br>unmask them:<br><br><br>Input Column:<br>Select the column from the input flow that contains the data to be<br>unmasked.<br><br>You can unmask all data masked with tDataMasking using the FF1 with AES or<br>FF1 with SHA-2 method combined with a user-defined password.<br><br>These modifications are based on the function you select<br>in the Function column.<br><br><br>Category: select<br>a category of unmasking functions from the list.<br><br><br>Function:<br>Select the function that will unmask data.<br><br>The functions you can select from the Function list<br>depend on the data type of the input column.<br><br><br>Method: From<br>this list, select the Format-Preserving Encryption (FPE) algorithm that<br>was used to mask data, FF1 with<br>AES or FF1 with<br>SHA-2:<br><br>The FF1 with AES<br>method is based on the Advanced Encryption Standard in CBC mode. The<br>FF1 with SHA-2 method<br>depends on the secure hash function HMAC-256.<br><br>Java 8u161 is the minimum required version to use the<br>FF1 with AES method. To be<br>able to use this FPE method with Java versions earlier than 8u161,<br>download the Java Cryptography Extension (JCE) unlimited strength<br>jurisdiction policy files from Oracle website.<br><br>To unmask data, the FF1 with AES and<br>FF1 with SHA-2 methods require the password specified<br>in Password or 256-bit key for FF1 methods when the data<br>was masked with the tDataMasking component.<br><br>When using the Character<br>handling functions, such as Replace all,<br>Replace characters between two positions,<br>Replace all digits with FPE methods, you must select<br>an alphabet.<br><br>From the Alphabet list, select the alphabet used<br>to mask data with the tDataMasking component.<br><br><br>Extra Parameter: This field is used<br>by some of the functions, it will be disabled when not applicable. When applicable,<br>enter a number or a letter to decide the behavior of the function you have<br>selected.<br><br><br>Keep<br>format: this function is only used on Strings. Select this check box to<br>keep the input format when using the Bank Account<br>Unmasking, Credit Card<br>Unmasking, Phone Unmasking and<br>SSN Unmasking categories. That is to say, if<br>there are spaces, dots ('.'), hyphens ('-') or slashes ('/') in the input, those<br>characters are kept in the output. If you select this check box when using Phone Unmasking functions, the characters that are not<br>numbers from the input are copied to the output as is. |

## Usage

| Usage guidance | Description |
| --- | --- |
| **Usage rule** | This component is used as an intermediate step.<br><br>This component, along with the Spark Structured Streaming component Palette it belongs to,<br>appears only when you are creating a Spark Structured Streaming Job. |
| Spark Connection | You need to use the Structured Streaming Configuration<br>tab in the Run view to define the connection to a Spark cluster for<br>the whole Job.<br><br>This connection is effective on a per-Job basis. |