# tExtractJSONFields Standard properties

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

The Standard tExtractJSONFields component belongs to the Processing family.

The component in this framework is available in all Talend products.

## Basic settings

| Property type | Either Built-In or Repository. |
| --- | --- |
|  | Built-In: No property data stored centrally. |
|  | Repository: Select the repository file where the<br>properties are stored. |
| 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><ul> <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><br><br>Click Edit<br>schema to make changes to the schema.<br><br>Information noteNote: If you<br>make changes, the schema automatically becomes built-in.<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> |
| Read By | Select a way of extracting JSON data in the<br>file.<br><br><ul> <li> <p> <span>JsonPath</span>: Extracts JSON data based on the                                JSONPath query. With this option selected, you need to select a                                JSONPath API version from the <span>API version</span>                                drop-down list. It is recommended to read data by JSONPath in order                                to gain better performance.</p> </li> <li> <p> <span>Xpath</span>: Extracts JSON data based on the XPath                                query.</p> </li> </ul> |
| JSON field | List of the JSON fields to be extracted. |
| Loop Jasonpath query | Enter the Jsonpath or XPath of the node on which the loop is based.<br><br>Note if you have selected Xpath from the Read by drop-down list, the Loop<br>Xpath query field is displayed instead. |
| Mapping | Complete this table to map the columns defined in the schema to the<br>corresponding JSON nodes.<br><br><ul> <li> <p> <span>Column</span>: The <span>Column</span> cells are automatically filled with the defined schema                    column names.</p> </li> <li> <p> <span>Json query</span>/<span>JSONPath query</span>: Specify the JSONPath node that holds the                    desired data. For more information about JSONPath expressions, see <a href="http://goessner.net/articles/JsonPath/" target="_blank">http://goessner.net/articles/JsonPath/</a>.</p> <p>This column is available only when <span>JsonPath</span> is selected from the <span>Read                        By</span> list.</p> </li> <li> <p> <span>XPath query</span>: Specify the XPath node that                    holds the desired data.</p> <p>This column is available only when <span>Xpath</span> is selected from the <span>Read                        By</span> list.</p> </li> <li> <p> <span>Get Nodes</span>: Select this check box to                    extract the JSON data of all the nodes or select the check box next to a                    specific node to extract the data of that node.</p> <p>This column is available only when <span>Xpath</span> is selected from the <span>Read                        By</span> list.</p> </li> <li> <p> <span>Is Array</span>: select this check box when the                    JSON field to be extracted is an array instead of an object.</p> <p>This column is available only when <span>Xpath</span> is selected from the <span>Read                        By</span> list.</p> </li> </ul> |
| Die on error | Select the check box to stop the execution of the Job when an error<br>occurs.<br><br>Clear the check box to skip any rows on error and complete the process for<br>error-free rows. When errors are skipped, you can collect the rows on error using a Row &gt; Reject link. |

## Advanced settings

| Use the loop node as root | Select this check box to use the loop node as the root for querying the file.<br><br>The loop node is set in the Loop Json query text frame<br>in the Basic Settings view. If this option is checked,<br>only the child elements of the loop node are available for querying; otherwise,<br>both the parent elements and the child elements of the loop node can be<br>queried. You can specify a parent element through JSON path syntax.<br><br>This check box is available only when JsonPath is<br>selected in the Read By drop-down list of the<br>Basic settings view. |
| --- | --- |
| Encoding | Select the encoding from the list or select Custom<br>and define it manually. This field is compulsory for database data handling. The<br>supported encodings depend on the JVM that you are using. For more information, see<br>[https://docs.oracle.com](https://docs.oracle.com/). |
| tStatCatcher Statistics | Select this check box to gather the Job processing metadata at a Job<br>level as well as at each component level. |

## Global Variables

| NB\_LINE | The number of rows processed. This is an After variable and<br>it returns an integer. |
| --- | --- |
| ERROR\_MESSAGE | The error message generated by the component when an error<br>occurs. This is an After variable and it returns a string. This variable<br>functions only if the Die on error<br>check box is selected. |

## Usage

| **Usage rule** | This component is an intermediate component. It needs an input and an<br>output components. |
| --- | --- |
| Limitation | Due to license incompatibility, one or more JARs required to use<br>this component are not provided. You can install the missing JARs for this particular<br>component by clicking the Install button<br>on the Component tab view. You can also<br>find out and add all missing JARs easily on the Modules tab in the<br>Integration<br>perspective of your studio. For<br>details, see *Installing external modules*.<br>You can find more details about how to install external modules in<br>Talend Help Center ([https://help.talend.com](https://help.talend.com/)). |