tContextLoad properties - 6.1

Talend Open Studio for Big Data Components Reference Guide

EnrichVersion
6.1
EnrichProdName
Talend Open Studio for Big Data
task
Data Governance
Data Quality and Preparation
Design and Development
EnrichPlatform
Talend Studio

Component family

Misc

 

Function

tContextLoad modifies dynamically the values of the active context.

Purpose

tContextLoad can be used to load 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.

Basic settings

Schema and Edit schema

A schema is a row description, it defines the fields that will be processed and passed on to the next component.

In tContextLoad, the schema must be made of two 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 notification must be displayed. In the shape of an Error, a warning or an information (info).

 

If a variable in the context, but not loaded

If a variable appears in the context but is not loaded, select how the notification must be displayed. In the shape of an Error, a warning or an information (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 error and complete the process for error-free rows.

Advanced settings

tStatCatcher Statistics

Select this check box to gather the Job processing metadata at a Job level as well as at each component level.

Dynamic settings

Click the [+] button to add a row in the table and fill the Code field with a context variable to turn on or off the Print operations option dynamically at runtime.

When a dynamic parameter is defined, the corresponding Print operations option in the Basic settings view becomes unusable.

For examples on using dynamic parameters, see Scenario 3: Reading data from MySQL databases through context-based dynamic connections and Scenario: Reading data from different MySQL databases using dynamically loaded connection parameters. For more information on Dynamic settings and context variables, see Talend Studio User Guide.

Global Variables

NB_LINE: the number of rows processed. This is an After variable and it returns an integer.

KEY_NOT_INCONTEXT: the variables are loaded but do not appear in the context. This is an After variable and it returns a string.

KEY_NOT_LOADED: the variables not loaded but appear in the context. This is an After variable and it returns a string.

ERROR_MESSAGE: the error message generated by the component when an error occurs. This is an After variable and it returns a string. This variable functions only if the Die on error check box is cleared, if the component has this check box.

A Flow variable functions during the execution of a component while an After variable functions after the execution of the component.

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 it.

For further information about variables, see Talend Studio User Guide.

Usage

This component relies on the data flow to load the context values to be used, therefore it requires a preceding input component and thus cannot be a start component.

Log4j

If you are using a subscription-based version of the Studio, the activity of this component can be logged using the log4j feature. For more information on this feature, see Talend Studio User Guide.

For more information on the log4j logging levels, see the Apache documentation at http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html.

Limitation

tContextLoad does not create any non-defined variable in the default context.