# tMatchGroup Standard properties

These properties are used to configure tMatchGroup running in the Standard Job framework.

The Standard tMatchGroup component belongs to the Data Quality family.

The component in this framework is available in Talend Data Management Platform, Talend Big Data Platform, Talend Real Time Big Data Platform, Talend Data Services Platform, and in Talend Data Fabric.

## Basic settings

| Schema and 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>The output schema of this component<br>contains the following read-only fields:<br><br>- *GID*: provides a<br>group identifier of the data type *String*.<br><br>Information noteNote: In Jobs migrated<br>from previous releases to your current Talend Studio, the group<br>identifier may be of the Long data type. To have a group identifier<br>of the String data type, replace the tMatchGroup components in the migrated Jobs with<br>tMatchGroup components from<br>the Palette.<br><br>-<br>*GRP\_SIZE*: counts the number<br>of records in the group, computed only on the master record.<br><br>- *MASTER*: identifies, by true or false, if the record used in the matching comparisons is a<br>master record. There is only one master record per group.<br><br>Each input record will be compared to<br>the master record, if they match, the input record will be in the<br>group.<br><br>- *SCORE*: measures the distance between the input<br>record and the master record according to the matching algorithm<br>used.<br><br>In case the tMatchGroup component is<br>used to have multiple output flows, the score in this column decides to<br>what output group the record should go.<br><br>- *GRP\_QUALITY* depends on the<br>Matching Algorithm:<br><br><ul> <li> <span>Simple VSR</span>: <em>GRP_QUALITY</em> provides the                                            quality of similarities in the group by taking the                                            minimal matching value. Only the master record has a                                            quality score. </li> <li> <span>T-Swoosh</span>: <em>GRP_QUALITY</em> provides the                                            quality of similarities in the group by taking the                                            minimal matching value among all record pairs of the                                            group. Only the master record has a quality score. </li> </ul><br><br>- *MERGED\_RECORD*: this<br>output column is available only:<br><br><ul> <li> When you have more than one tMatchGroup                                    component in the Job and </li> <li> When the T-swoosh algorithm is selected. </li> </ul><br><br>The column explains with *true* or *false* if the record is respectively a master record or not a<br>master record in the first pass. |
| --- | --- |
|  | 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. |
| Matching<br>Algorithm | Select from the list<br>the algorithm you want to use in the component: Simple VSR or T-Swoosh. |
| ![](https://help.qlik.com/talend/en-US/components/7.3/Resources/images/match_rule_import_icon.png) | Click the import<br>icon to import a match rule from the Studio repository.<br><br>In the Match Rule<br>Selector wizard, import a match rule with the same<br>algorithm as the selected matching algorithm in the basic settings of<br>the component. Otherwise, the Job runs with default values for the<br>parameters which are not compatible between the Simple VSR and the<br>t-Swoosh algorithms.<br><br>For further<br>information about how to import rules, see [Importing match rules from the studio repository](https://help.qlik.com/talend/en-US/data-matching/7.3/importing-match-rules-from-studio-repository) |
| Key<br>Definition | Input Key<br>Attribute<br><br>Select the<br>column(s) from the input flow on which you want to apply a matching<br>algorithm.<br><br>Information noteNote: When you select a date column on which to apply an algorithm or a matching<br>algorithm, you can decide what to compare in the date format.<br><br>For example,<br>if you want to only compare the year in the date, in the component schema set the type<br>of the date column to Date and then enter "*yyyy*" in the Date Pattern field.<br>The component then converts the date format to a string according to the pattern defined<br>in the schema before starting a string comparison. |
|  | Matching Function<br><br>Select a matching algorithm from the<br>list:<br><br><br>Exact: matches each processed entry to<br>all possible reference entries with exactly the same value. It returns<br>*1* when the two strings<br>exactly match, otherwise it returns *0*.<br><br><br>Exact - ignore case:<br>matches each processed entry to all possible reference entries with<br>exactly the same value while ignoring the value case.<br><br><br>Soundex: matches processed entries<br>according to a standard English phonetic algorithm. It indexes strings<br>by sound, as pronounced in English, for example "Hello": "H400".It does not support Chinese characters.<br><br><br>Levenshtein (edit distance): calculates<br>the minimum number of edits (insertion, deletion or substitution)<br>required to transform one string into another. Using this algorithm in<br>the tMatchGroup<br>component, you do not need to specify a maximum distance. The component<br>automatically calculates a matching percentage based on the distance.<br>This matching score will be used for the global matching calculation,<br>based on the weight you assign in the Confidence Weight field.<br><br><br>Metaphone: Based on a phonetic algorithm<br>for indexing entries by their pronunciation. It first loads the<br>phonetics of all entries of the lookup reference and checks all entries<br>of the main flow against the entries of the reference flow. It does not support Chinese characters.<br><br><br>Double Metaphone: a new version of the<br>Metaphone phonetic algorithm, that produces more accurate results than<br>the original algorithm. It can return both a primary and a secondary<br>code for a string. This accounts for some ambiguous cases as well as for<br>multiple variants of surnames with common ancestry. It does not support Chinese characters.<br><br><br>Soundex FR: matches processed entries<br>according to a standard French phonetic algorithm.It does not support Chinese characters.<br><br><br>Jaro: matches processed entries<br>according to spelling deviations. It counts the number of matched<br>characters between two strings. The higher the distance is, the more<br>similar the strings are.<br><br><br>Jaro-Winkler: a variant of Jaro, but it gives more<br>importance to the beginning of the string.<br><br>Fingerprint<br>key: matches entries after doing the following<br>sequential process:<br><br><ol> <li>Remove leading and trailing                                    whitespace.</li> <li>Change all characters to their                                    lowercase representation. <span>It does not support Chinese characters.</span> </li> <li>Remove all punctuation and                                    control characters.</li> <li>Split the string into                                    whitespace-separated tokens.</li> <li>Sort the tokens and remove                                    duplicates.</li> <li>Join the tokens back together.                                    Because the string parts are sorted, the given order of tokens                                    does not matter. So, <em>Cruise,                                        Tom</em> and <em>Tom                                        Cruise</em> both end up with a fingerprint <em>cruise tom</em> and therefore end up in the                                    same cluster.</li> <li>Normalize extended western                                    characters to their ASCII representation, for example <em>gödel</em> to <em>godel</em>. This reproduces                                    data entry mistakes performed when entering extended characters                                    with an ASCII-only keyboard. However, this procedure can also                                    lead to false positives, for example <em>gödel</em> and <em>godél</em> would both end up with <em>godel</em> as their                                    fingerprint but they are likely to be different names. So this                                    might work less effectively for datasets where extended                                    characters play substantial differentiation role.</li> </ol><br><br><br>q-grams: matches processed entries by<br>dividing strings into letter blocks of length q in order to create a number of q length grams. The<br>matching result is given as the number of q-gram matches over possible<br>q-grams.<br><br><br>Hamming: calculates the<br>minimum number of substitutions required to transform one string into<br>another string having the same length. For example, the Hamming distance<br>between "masking" and "pairing" is 3.<br><br><br>custom...:<br>enables you to load an external matching algorithm from a Java library<br>using the custom<br>Matcher column.<br><br>For further information about how to load an external Java library, see<br>[tLibraryLoad](https://help.qlik.com/talend/en-US/components/7.3/library-import/tlibraryload).<br><br>For further information about how to<br>create a custom matching algorithm, see [Creating a custom matching algorithm](https://help.qlik.com/talend/en-US/data-matching/7.3/creating-custom-matching-algorithm).<br><br>For a related scenario about how to use a custom matching algorithm,<br>see [Using a custom matching algorithm to match entries](https://help.qlik.com/talend/en-US/data-matching/7.3/using-custom-matching-algorithm-to-match-entries). |
|  | Custom Matcher<br><br>When you select Custom as the matching<br>type, enter the path pointing to the custom class (external matching<br>algorithm) you need to use. This path is defined by yourself in the<br>library file (*.jar* file) which<br>you can import by using the tLibraryLoad component.<br><br>For example, to use a *MyDistance.class* class stored in the directory<br>*org/talend/mydistance* in a<br>user-defined *mydistance.jar*<br>library, the path to be entered is *org.talend.mydistance.MyDistance*. |
|  | Tokenized measure<br><br>Tokenization<br>is the concept of splitting a string into words. Select the method to<br>use to compute a tokenized measure for the selected algorithm:<br><br><br>NO: no<br>tokenization method is used on the string. With this option, "John Doe"<br>and "Jon Doe" should match.<br><br><br>Same place: splits the two strings by<br>words to two lists, list1 and list2. Associates each element from list1<br>with the element which has the same position in list2. Using this<br>method, "She is red and he is pink" and "Catherine is red and he is<br>pink" should match.<br><br><br>Same order: splits the two strings by words to two<br>lists, list1 and list2 and assumes that list1 is shorter than list2.<br>Tries to associate the elements from list1 with the elements in list2<br>taken in the same order. Using this method, "John Doe" and "John B. Doe"<br>match.<br><br>This method should be used only with<br>strings which has a few words, otherwise the number of possible<br>combinations can be large.<br><br><br>Any order: splits the two strings by<br>words to two lists, list1 and list2 and assumes that list1 is shorter<br>than list2. Tries to assign each word of list1 to a word of list2, in<br>order to have the highest global similarity (with respect to the used<br>similarity).<br><br>Using this method, "John Doe" and<br>"Doe John" match. |
|  | Threshold<br><br>This column is displayed when you<br>selected T-Swoosh as the matching algorithm.<br><br>Two data records match when the probability is greater<br>than or equal to the set value.<br><br>Set a threshold between *0* and<br>*1*. You can enter up to 6<br>decimals.<br><br><br>*0* means that the similarity between values in the column is not<br>measured. *1* means that you want<br>each two compared values of the column to exactly match. Default value<br>is *1*. |
|  | Confidence Weight<br><br>Set a numerical weight for each<br>attribute (column) of the key definition.<br><br>You can<br>enter a number or a context variable.<br><br>The value<br>must be an integer greater than 0. |
|  | Handle Null<br><br>To handle null values, select from the<br>list the null operator you want to use on the column:<br><br><br>Null Match Null: a Null attribute only<br>matches another Null attribute.<br><br><br>Null Match<br>None means that you: a Null attribute never matches<br>another attribute.<br><br><br>Null Match All: a Null<br>attribute matches any other value of an attribute.<br><br>For example, if we have two columns, *name* and *firstname* where the name is never null, but the first name can<br>be null.<br><br>If we have two records:<br><br>"Doe", "John"<br><br>"Doe", ""<br><br>Depending on the operator you choose, these two records<br>may or may not match:<br><br><br>Null Match Null: they<br>do not match.<br><br><br>Null Match None: they<br>do not match.<br><br><br>Null Match All: they<br>match.<br><br>And for the records:<br><br>"Doe", ""<br><br>"Doe", ""<br><br><br>Null Match Null: they<br>match.<br><br><br>Null Match None: they do not<br>match.<br><br><br>Null Match All: they<br>match. |
|  | Survivorship Function (only available when the<br>T-Swoosh algorithm is<br>selected): Select how two similar records will be merged from the<br>drop-down list.<br><br><ul> <li> <span>Concatenate</span>: this function adds the content of the                                first record and the content of the second record together. for                                example, Bill and William will be merged into BillWilliam. In the                                    <span>Parameter</span> field, you can                                specify a separator to be used to separate values.</li> <li> <span>Prefer True (for                                    booleans)</span>: This function always set booleans to True                                in the merged record, unless all booleans in the source records are                                False.</li> <li> <span>Prefer False (for                                    booleans)</span>: This function always sets booleans to                                False in the merged record, unless all booleans in the source                                records are True.</li> <li> <span>Most                                common</span>: This function validates the most                                frequently-occurring field value in each group of duplicate                                records.</li> <li> <span>Most                                recent</span>: This function validates the latest date value in                                each group of duplicate records. If more than one date type is                                defined in the schema, select a column in <span>Reference column</span>. If no date type                                is defined in the schema, the data are sorted into most recent                                loading order.</li> <li> <span>Most                                    ancient</span>: This function validates the earliest date                                value in each group of duplicate records. If more than one date type                                is defined in the schema, select a column in <span>Reference column</span>. If no date type                                is defined in the schema, the data are sorted into most ancient                                loading order.</li> <li> <span>Longest (for                                    strings)</span>: This function validates the longest field                                value in each group of duplicate records.</li> <li> <span>Shortest (for                                    strings)</span>: This function validates the shortest field                                value in each group of duplicate records.</li> <li> <span>Largest (for                                    numbers)</span>: This function validates the largest                                numerical value in each group of duplicate records.</li> <li> <span>Smallest (for                                    numbers)</span>: This function validates the smallest                                numerical value in each group of duplicate records.</li> <li> <span>Most trusted                                    source</span>: This function takes the data coming from the                                source which has been defined as being most trustworthy. The most                                trusted data source is set in the <span>Parameter</span> field. This function is only used in the                                context of integrated matching in <span>Talend MDM</span>.</li> </ul> |
|  | Reference<br>column<br><br>If you set Survivor Function to Most recent or Most ancient, this column is used to<br>select the reference column. |
|  | Parameter<br><br>If you set Survivorship<br>Function to Most trusted<br>source, this item is used to set the name of the data<br>source you want to use as a base for the master record.<br><br>If you set Survivorship<br>Function to Concatenate, this item is used to specify a separator<br>you want to use for concatenating data. |
| Match<br>Threshold | Enter the match<br>probability. Two data records match when the probability is greater than<br>or equal to the set value.<br><br>You<br>can enter a different match threshold for each match rule. |
| Survivorship Rules For Columns (only available when the<br>T-Swoosh algorithm is<br>selected) | Input<br>Column: Select the column(s) from the input flow on<br>which you want to apply a survivorship function.<br><br><br>Survivorship Function:<br>Select how two similar records will be merged from the drop-down<br>list. |
| Default Survivorship Rules<br><br><br>(only available when the<br>T-Swoosh algorithm is<br>selected) | Data<br>Type: Select the data type(s) from the input flow on<br>which you want to apply a survivorship function.<br><br><br>Survivorship Function:<br>Select how two similar records will be merged from the drop-down<br>list. |
| Blocking<br>Selection | Input Column<br><br>If required, select the column(s) from<br>the input flow according to which you want to partition the processed<br>data in blocks, this is usually referred to as "blocking".<br><br>Blocking reduces the number of pairs of<br>records that needs to be examined. In blocking, input data is<br>partitioned into exhaustive blocks designed to increase the proportion<br>of matches observed while decreasing the number of pairs to compare.<br>Comparisons are restricted to record pairs within each block.<br><br>Using blocking column(s) is very useful<br>when you are processing very big data. |

## Advanced settings

| Store on<br>disk | Select the<br>Store on<br>disk check box if you want to store processed data<br>blocks on the disk to maximize system performance.<br><br><br>Max buffer<br>size: Type in the size of physical memory you want to<br>allocate to processed data.<br><br><br>Temporary data<br>directory path: Set the location where the temporary<br>file should be stored. |
| --- | --- |
| Multiple<br>output | Select the Separate output<br>check box to have several output flows:<br><br><ul> <li> <span>Uniques</span>: when the group size (minimal                                            distance computed in the record) is equal to <em>1</em>, the record                                            is listed in this flow. <p>When records                                                are not unique, they can be:</p> </li> <li> <span>Matches</span>: when the                                                  group quality is greater than or equal to the threshold                                                  you define in the <span>Confident match                                                  threshold</span> field, the record is listed                                                  in this flow. </li> <li> <span>Suspects</span>: when the group quality                                            is less than the threshold you define in the <span>Confident match                                                threshold</span> field, the record is listed in                                            this flow.</li> </ul><br><br>Information noteNote:<br><br>When using the Simple VSR<br>algorithm, the group quality is the minimal distance<br>computed in the record.<br><br>When using the t-Swoosh algorithm, the<br>group quality is the minimal distance computed among all record<br>pairs of the group.<br><br><br>Confident match<br>threshold: set a numerical value between the<br>current Match<br>threshold and *1*. From this threshold, you can be<br>confident in the quality of the group. |
| Multi-pass | Select this check<br>box to enable a tMatchGroup<br>component to receive data sets from another tMatchGroup that<br>precedes it in the Job. This will refine the groups received by each of<br>the tMatchGroup<br>components through creating data partitions based on different blocking<br>keys.<br><br>Information noteNote: When using two tMatchGroup components in a Job and this option, you must<br>select this check box in both tMatchGroup components before linking them together. If<br>you linked the components before selecting this check box, select this<br>check box in the second component in the Job flow and then, in the first<br>component. Otherwise, you may have an issue as there are two columns in<br>the output schema with the same name. Selecting this check box in only<br>one tMatchGroup component may cause<br>schema mismatch issues.<br><br>With multi-pass matching, all<br>master records are generated but intermediate master records are removed<br>from the output flow. Only final master and original records are kept at<br>the end.<br><br>When single master records from the 1st tMatchGroup merge<br>into one group after passing the 2nd tMatchGroup, their<br>order in the group may change every time you run the Job.<br><br>For<br>an example Job, see [Matching customer data through multiple passes](https://help.qlik.com/talend/en-US/data-matching/7.3/matching-customer-data-through-multiple-passes)<br><br><br>Propagate original<br>values: This option is available only with the<br>T-Swoosh<br>algorithm. Select this check box to allow the original records from each<br>pass (and not only the unmatched records) to also be considered in the<br>second pass of matching, both against each other and against the<br>survived masters. This helps to make sure that no matches are<br>missed. |
| Sort the output data by<br>GID | Select this check<br>box to group the output data by the group identifier.<br><br>The output is sorted in ascending alphanumeric order by<br>group identifier. |
| Output distance<br>details | Select this check<br>box to add an output column *MATCHING\_DISTANCES* in the schema of the component. This column<br>provides the distance between the input and master records in each<br>group.<br><br>Information noteNote: When using two tMatchGroup components in a Job and this option, you must<br>select this check box in both tMatchGroup components before linking them together. If<br>you linked the components before selecting this check box, select this<br>check box in the second component in the Job flow and then, in the first<br>component. Otherwise, you may have an issue as there are two columns in<br>the output schema with the same name. Selecting this check box in only<br>one tMatchGroup component may cause<br>schema mismatch issues. |
| Display detailed<br>labels | Select this check<br>box to have in the output *MATCHING\_DISTANCES* column not only the matching distance but<br>also the names of the columns used as key attributes in the applied<br>rule.<br><br>For example, if you try to<br>match on first name and last name fields, *lname* and *fname*, the output would be fname:1.0\|lname:0.97 when the check box<br>is selected and 1.0\|0.97 when it is not selected. |
| Deactivate matching computation<br>when opening the wizard | Select this check<br>box to open the Configuration Wizard without running the match rules<br>defined in the wizard.<br><br>This<br>enables you to have a better experience with the component. Otherwise,<br>the wizard may take some time to open. |
| tStatCatcher<br>Statistics | Select this check<br>box to collect log data at the component level. Note that this check box<br>is not available in the Map/Reduce version of the<br>component. |

## Global Variables

| Global<br>Variables | ERROR\_MESSAGE: the error message generated by the component when an<br>error occurs. This is an After variable and it returns a string. This variable functions<br>only if the Die on error check box<br>is cleared, if the component has this check<br>box.<br><br>A Flow variable functions during the execution of a component<br>while an After variable functions after the execution of the component.<br><br>To fill up a field or expression with a<br>variable, press Ctrl + Space to<br>access the variable list and choose the variable to use from it.<br><br>For further information about variables, see *Talend Studio*<br>*User Guide*. |
| --- | --- |

## Usage

| **Usage<br>rule** | This component is<br>an intermediary step. It requires an input flow as well as an output<br>flow. |
| --- | --- |