# tStandardizeRow properties for Apache Spark Batch

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

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

The component in this framework is available in all Talend Platform products with Big Data and in 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> </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> |
| Column to parse | Select the column to be parsed from the received data<br>flow |
| Standardize this field | Select this check box to standardize the rule-compliant<br>data identified, that is, to replace the duplicates of the identified<br>data with the corresponding standardized data from a given index.<br><br>For further information about this index providing<br>standardized data, see [tSynonymOutput](https://help.qlik.com/talend/en-US/components/8.0/synonym-index/tsynonymoutput).<br><br>Every time you select or clear this check box, the schema<br>of this component is changed automatically, so in a given Job, you need<br>to click the activated Sync<br>columns button to fix the inconsistencies in the<br>schema. |
| Generate analyzer code as routine | Click this button to enable the data parser of Talend Studio to recognize the rules defined in the Conversion<br>rules table.<br><br>In a given Job, when a rule is created, this operation is<br>required for the execution of this rule, while if it is on an existing<br>rule that you have modified, this operation is required only when the<br>modified rule is of type Enumeration, Format or Combination. For further information about all of the<br>rule types, see [Rule types](https://help.qlik.com/talend/en-US/components/8.0/standardization/tstandardizerow-tstandardizerow-rule-types-standard-component-enterprise-two). |
| ![](https://help.qlik.com/talend/en-US/components/8.0/Resources/images/import.png) and ![](https://help.qlik.com/talend/en-US/components/8.0/Resources/images/export.png) | Click the import or export button to exchange a given<br>standardization rule set with the DQ<br>Repository.<br><br>- When you click the export button, Talend Studio is switched to the Profiling perspective and the Parser rule<br>Settings view is opened on the workspace with the relative<br>contents filled automatically. Then if need be, you can edit the exported rule<br>set and save it to the Libraries &gt; Rules &gt; Parser folder in the DQ<br>Repository tree view.<br><br>- When you click the import button, a import wizard is<br>opened to help you import the standardization rule of interest.<br><br>For further information, see [Setting and managing parser rules](https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/setting-and-managing-parser-rules). |
| Conversion rules | Define the rules you need to apply as the following:<br><br>- In the Name<br>column, type in a name of the rule you want to use. This name is used as<br>the XML tag or the JSON attribute name and the token name to label the<br>incoming data identified by this rule.<br><br>- In the Type<br>column, select the type of the rule you need to apply. For further<br>information about available rule types, see [Rule types](https://help.qlik.com/talend/en-US/components/8.0/standardization/tstandardizerow-tstandardizerow-rule-types-standard-component-enterprise-two).<br><br>- In the Value<br>column, type in the syntax of the rule.<br><br>- In the Search<br>mode column, select a search mode from the list. The<br>search modes can be used only with the Index rule type. For further information about<br>available search modes, see [Search modes for Index rules](https://help.qlik.com/talend/en-US/components/8.0/standardization/search-modes-for-index-rules).<br><br>- When you select the Index rule type, set the<br>path as follows:<br><br><ul> <li>In local mode:<ul> <li>Apache Spark 3.1 and earlier: <span>prefix://file                                                path</span> or <span>file:///file                                                path</span>.</li> <li>Apache Spark 3.2 and later: <span>file:///file path</span>.</li> </ul> </li> <li>In Standalone and Yarn modes: <span>prefix://file path</span>.</li> <li>If the index is on a cluster: <span>hdfs://hdpnameservice1/file path</span>.                            </li> </ul><br><br>A test view is provided to help you create the parser rules of<br>interest. For further information, see [Setting and managing parser rules](https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/setting-and-managing-parser-rules). |

## Advanced settings

| Properties | Description |
| --- | --- |
| Advanced options for INDEX rules | - Search UNDEFINED<br>fields: select this check box if you want the component<br>to search for undefined tokens in the index run results.<br><br>- Word distance for partial<br>match (available for the *Match<br>partial* mode): set the maximum number of words allowed to come<br>inside a sequence of words that may be found in the index, default value<br>is *1*.<br><br>- Max edits for fuzzy<br>match (Based on the Levenshtein algorithm and available<br>for fuzzy modes): select an edit distance,*1* or *2*, from the list. Any terms within the edit<br>distance from the input data are matched. With a max edit distance *2*, for example, you can have up to two<br>insertions, deletions, or substitutions. The score for each match is<br>based on the edit distance of that term.<br><br>Fuzzy match gains much in performance with Max edits for fuzzy match.<br><br>Information noteNote: Jobs migrated in Talend Studio from older releases run correctly, but results might be slightly different<br>because Max edits for fuzzy match is now<br>used in place of Minimum similarity for fuzzy<br>match. |
| Output format | -XML: this option<br>is selected by default. It outputs normalized data in XML format.<br><br>-JSON: select this<br>option to output normalized data in JSON format. |

## Usage

| Usage guidance | Description |
| --- | --- |
| **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. |
| Connections | Outgoing links (from this component to another):<br><br><br>Row: Main; Reject<br><br>Incoming links (from one component to this one):<br><br><br>Row: Main; Reject<br><br>For further information regarding connections, see [Using connections in a Job](https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/using-connections-in-job). |
| 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> <p>When using on-premises distributions, use                                        the configuration component corresponding to the file system                                        your cluster is using. Typically, this system is HDFS and so                                        use <a href="https://help.qlik.com/talend/r/en-US/8.0/components/hdfs/thdfsconfiguration">tHDFSConfiguration</a>.</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 <a href="https://help.qlik.com/talend/r/en-US/8.0/components/hdfs/thdfsconfiguration-properties-for-apache-spark-batch">tHDFSConfiguration Apache Spark Batch</a> or <a href="https://help.qlik.com/talend/r/en-US/8.0/components/amazon-s3/ts3configuration-properties-for-apache-spark-batch">tS3Configuration Apache Spark Batch</a>.</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. |