# tDataUnmasking properties for Apache Spark Batch

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

The Spark Batch tDataUnmasking component belongs to the Data Quality family.

## Basic settings

| Schema and<br>Edit Schema | A schema is a row description. It defines the number of fields<br>(columns) to be processed and passed on to the next component. When you create a Spark<br>Job, avoid the reserved word line when naming the<br>fields.<br><br>Click Sync<br>columns to retrieve the schema from the previous component connected in the<br>Job.<br><br>Click Edit<br>schema to make changes to the schema. If the current schema is of the Repository type, three options are available:<br><br><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. 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><br><br>The output schema of this component<br>contains one read-only column, *ORIGINAL\_MARK*. This column identifies by true or false if the record is an original record<br>or a substitute record respectively. |
| --- | --- |
|  | Built-In: You create and store the schema locally for this component<br>only. |
|  | Repository: You have already created the schema and stored it in the<br>Repository. You can reuse it in various projects and Job designs. |
| Modifications | Define in the table what fields to unmask and how to unmask them:<br><br><br>Input Column: Select the column from the input<br>flow that contains the data to be unmasked.<br><br>These modifications are based on the function you select in the Function<br>column.<br><br><br>Category: select a category of unmasking functions<br>from the list.<br><br><br>Function: Select the function that will unmask<br>data.<br><br>The functions you can select from the Function list depend on the data<br>type of the input column.<br><br><br>Method: From this list, select the<br>Format-Preserving Encryption (FPE) algorithm that was used to mask data,<br>FF1 with AES or FF1 with<br>SHA-2:<br><br>The FF1 with AES method is based on the Advanced<br>Encryption Standard in CBC mode. The FF1 with<br>SHA-2 method depends on the secure hash function<br>HMAC-256.<br><br>Java 8u161 is the minimum required version to use the FF1 with<br>AES method. To be able to use this FPE method with Java<br>versions earlier than 8u161, download the Java Cryptography Extension<br>(JCE) unlimited strength 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<br>specified in the Password for FF1 methods field when the data was masked<br>with the tDataMasking component.<br><br>When using the Replace all, Replace characters between two positions,<br>Replace n first digits and Replace n last digits with FPE methods, you<br>can select an alphabet.<br><br>Select the alphabet used to mask data with the<br>tDataMasking component.<br><br><br>Extra Parameter: This field is used by some of the<br>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<br>have selected.<br><br><br>Keep format: this function is only used on<br>Strings. Select this check box to keep the input format when using the<br>SSN Masking functions, Phone<br>Unmasking functions. That is to say, if there are<br>spaces, dots ('.'), hyphens ('-') or slashes ('/') in the input, those<br>characters are kept in the output. If you select this check box when<br>using Phone Masking functions, the characters<br>that are not numbers from the input are copied to the output as is. |

## Advanced settings

| Password for FF1 methods | To unmask data, the FF1 with AES and FF1 with SHA-2 methods require the<br>password specified in the Password for FF1 methods field when the data<br>was masked with the tDataMasking component. |
| --- | --- |
| Output the original row | Select this check box to output masked data rows in addition to the<br>original data. Having both data rows can be useful in debug or test<br>processes. |
| Should null input return null | This check box is selected by default. When selected, the component<br>outputs *null* when input values are null. Otherwise,<br>it returns the default value when the input is null, that is an empty<br>string for string values, *0* for numeric values and<br>the current date for date values. |
| Should empty input return empty | When this check box is selected, the component returns the input values<br>if they are empty. Otherwise, the selected functions are applied to the<br>input data. |
| tStat<br>Catcher<br>Statistics | Select this check box to gather the Job processing metadata at the Job<br>level as well as at each component level. |

## Usage

| **Usage rule** | This component is used as an intermediate step.<br><br>This component, along with the Spark Batch component Palette it belongs to,<br>appears only when you are creating a Spark Batch Job.<br><br>Note that in this documentation, unless otherwise explicitly stated, a<br>scenario presents only Standard Jobs, that is to<br>say traditional<br>Talend<br>data integration Jobs. |
| --- | --- |
| Spark Connection | In the Spark<br>Configuration tab in the Run<br>view, define the connection to a given Spark cluster for the whole Job. In<br>addition, since the Job expects its dependent jar files for execution, you must<br>specify the directory in the file system to which these jar files are<br>transferred so that Spark can access these files:<br><br><ul> <li> <div> <span>Yarn mode</span> (Yarn client or Yarn cluster):<ul> <li> <p>When using Google Dataproc, specify a bucket in the                                            <span>Google Storage staging bucket</span>                                        field in the <span>Spark configuration</span>                                        tab.</p> </li> <li> <p>When using HDInsight, specify the blob to be used for Job                                        deployment in the <span>Windows Azure Storage                                            configuration</span> area in the <span>Spark                                            configuration</span> tab.</p> </li> <li>When using Altus, specify the S3 bucket or the Azure                                    Data Lake Storage for Job deployment in the <span>Spark                                        configuration</span> tab.</li> <li>When using Qubole, add a                                        <span>tS3Configuration</span> to your Job to write                                    your actual business data in the S3 system with Qubole. Without                                        <span>tS3Configuration</span>, this business data is                                    written in the Qubole HDFS system and destroyed once you shut                                    down your cluster.</li> <li> <p>When using on-premise distributions, use the configuration component                                        corresponding to the file system your cluster is using.                                        Typically, this system is HDFS and so use <span></span>.</p> </li> </ul> </div> </li> <li> <p> <span>Standalone mode</span>: use the                            configuration component corresponding to the file system your cluster is                            using, such as <span>tHDFSConfiguration</span> or <span>tS3Configuration</span>.</p> <p>If you are using Databricks without any configuration component present                            in your Job, your business data is written directly in DBFS (Databricks                            Filesystem).</p> </li> </ul><br><br>This connection is effective on a per-Job basis. |