# tContextLoad

Loads a context from a flow.

This component performs also two controls. It warns when the parameters defined in the incoming flow are not defined in the context, and the other way around, it also warns when a context value is not initialized in the incoming flow.But note that this does not block the processing.

tContextLoad modifies dynamically the values of the active context.

Information noteNote: When this component is used to load context parameters dynamically, the parameter values will be loaded from the specified file or database and the parameter values statically defined in Talend Studio, or in Talend Management Console in the case of Talend Cloud context parameters, will not take effect.

## tContextLoad Standard properties

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

The Standard tContextLoad component belongs to the Misc family.

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

## Basic settings

| Properties | Description |
| --- | --- |
| Schema and Edit schema | A schema is a row description, it defines the fields that will be processed and<br>passed on to the next component.<br><br>In tContextLoad, the schema must be made of two<br>columns, including the parameter name and the parameter value to be loaded. |
| If a variable loaded, but not in the context | If a variable is loaded but does not appear in the context, select how the<br>notification must be displayed. In the shape of an Error, a warning or an information<br>(info). |
| If a variable in the context, but not loaded | If a variable appears in the context but is not loaded, select how the<br>notification must be displayed. In the shape of an Error, a warning or an information<br>(info). |
| Print operations | Select this check box to display the context parameters set in the Run view. |
| Disable errors | Select this check box to prevent the error from displaying. |
| Disable warnings | Select this check box to prevent the warning from displaying. |
| Disable infos | Select this check box to prevent the information from displaying. |
| Die on error | This check box is selected by default. Clear the check box to skip the row on<br>error and complete the process for error-free rows. |

## Advanced settings

| Properties | Description |
| --- | --- |
| tStat<br>Catcher Statistics | Select this check box to gather the Job processing metadata at a Job level as<br>well as at each component level. |

## Global Variables

| Variables | Description |
| --- | --- |
| Global Variables | NB\_LINE:<br>the number of rows processed. This is an After variable and it returns an integer.<br><br><br>KEY\_NOT\_INCONTEXT: the variables are loaded but do not<br>appear in the context. This is an After variable and it returns a string.<br><br><br>KEY\_NOT\_LOADED: the variables not loaded but appear in the context.<br>This is an After variable and it returns a string.<br><br><br>ERROR\_MESSAGE: the error message generated by the<br>component when an error occurs. This is an After variable and it returns a string. This<br>variable functions only if the Die on error checkbox is<br>cleared, if the component has this checkbox.<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 variable, press Ctrl+Space to access the variable list and choose the variable to use from<br>it.<br><br>For more information about variables, see [Using contexts and variables](https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/contexts-and-variables). |

## Usage

| Usage guidance | Description |
| --- | --- |
| **Usage rule** | This component relies on the data flow to load the context values to be used,<br>therefore it requires a preceding input component and thus cannot be a start<br>component. |
| Dynamic settings | Click the [+] button to add a row in the table<br>and fill the Code field with a context variable to<br>turn on or off the Print operations option<br>dynamically at runtime.<br><br>When a dynamic parameter is defined, the corresponding Print operations option in the Basic<br>settings view becomes unusable.<br><br>For examples on using dynamic parameters, see [Reading data from databases through<br>context-based dynamic connections](https://help.qlik.com/talend/r/en-US/8.0/components/defining-context-groups/reading-data-from-databases-through-context-based-dynamic-connections) and [Reading data from different MySQL databases<br>using dynamically loaded connection parameters](https://help.qlik.com/talend/r/en-US/8.0/components/context/reading-data-from-different-mysql-databases-using-dynamically-loaded-connection-parameters). For more information on<br>Dynamic settings and context variables, see<br>[Dynamic schema](https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/dynamic-schema) and [Creating a context group and define context<br>variables in it](https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/creating-context-group-and-define-context-variables-in-it). |
| Limitation | tContextLoad does not create any non-defined<br>variable in the default context. |

**Related concepts**

* [Reading data from different MySQL databases using dynamically loaded connection parameters](https://help.qlik.com/talend/en-US/components/8.0/context/reading-data-from-different-mysql-databases-using-dynamically-loaded-connection-parameters)