Table of Contents
The data functions in the DTC
Among the pre-defined functions provided in the Data Transformation Component (DTC) to support data transformation, there are two that are classed as “data” functions, Fixed / Dynamic Data and Run VBScript.
This article will will focus on the Fixed / Dynamic Data function.
Comparing fixed and dynamic data
The Fixed / Dynamic Data function is used to map fixed or dynamic data to the tool input schema. It allows you to assign values to any of the xml elements in the schema.
Dynamic data is data provided by variables, such as those populated through TaskCentre event tools.
Fixed data consists of fixed values, such as constants or literal values. It could, for example, be a constant defined in the Web Service Connector tool. Or you could simply type a literal value into the function, when the data is not available on the input side of the DTC. Entering literal values is actually the most common use for the function.
Focus on the Fixed / Dynamic Data function
You access the Fixed / Dynamic Data function from the Data category in the Functions pane of the data transformation component (DTC).
To use the function, you drag an instance of it into the Transformation Mapping area. Then you drag the required connectors into place between the function box and the required xml elements.
You can also open the function’s dialog box by double-clicking the function icon and set various options there.
Using the Fixed / Dynamic Data function
Let’s take a look at a situation where the Fixed / Dynamic Data function could be used in a data transformation.
Above: you can see the DTC for the Web Service Connector tool, showing our example of the Fixed / Dynamic data function in use.
Above: To use the function, drag and drop an instance of it from the Functions pane into the Transformation Mappings area.
You then add connectors between the function and the required xml elements. In this case we are mapping from the function to the sessionId element in the Tool Input schema.
Above: you can see that in place of the Transformation Mappings pane, the Transformation Function settings are displayed for the Fixed / Dynamic Data function.
As you can see above, using the browser you can view the variables under the Environment tab and drag them from there into the Value tab of the Function settings.
The variable SessionID has been entered and is displayed as an output text value.
This is a dynamic function because variable data passing into the function is populated during the task run time.
In the example above, we are about to populate the function with a constant that has been defined in the global web connector.
(See System> Tools > Execute > Web Service Connector> Web Service Configurations)
There is a Constants tab within each configuration.
Above: The constants can also be viewed under the Environment tab of the browser and dragged from there into the Value tab of the Function settings.
The constant in the example is being used to supply logon credentials. The relevant output text value is displayed under the Value tab.
This is a fixed data function, because its value does not change at run time.
This contrasts with the dynamic data we have just examined.
Unlike most of the other functions in the DTC , such as lookups and the Run VBScript functions, the Fixed / Dynamic Data function has no Input tab.
This is because the input for this type of function comes from the variables or constants selected for use. As you have seen, these are set under the Value tab.
There is, however, an Output tab, where the parameters and their mappings are displayed.
Above: Like other DTC functions, the Fixed / Dynamic Data function has the option to set the behaviour for the handling of any exceptions that may occur.
It is done under the Options tab. The default setting is to output an empty string. Other options are to output no data, to output a specified value or trigger an error message.
Fixed/Dynamic Data Transform Functions: In summary
The data functions in the DTC are used to manipulate data in various ways before it is consumed by the tool. TaskCentre provides two data functions, Fixed / Dynamic Data and the Run VBScript. The Fixed / Dynamic Data function is used to assign values to source data when mapping it to the tool input schema.
Fixed data refers to data with fixed values, such as constants or literal values which can be typed into the function if there is no data available on the input side of the DTC. Dynamic data refers to variables data with values that change according to the manipulation carried out by the function.
To use the Fixed / Dynamic Data function, you drag an instance of it from the functions pane to the transformation mappings pane and then drag connectors between the function box and xml elements in the tool input schema.
You can open the function’s settings and specify output parameters and their mappings, exception behaviour and the constants, variables or literal values being applied. Unlike most DTC functions, this function has no Input tab, because the input consists of those constants, variables and literal values.
- Overview of the (DTC) Data Transformation Component
- Transform functions – External lookup
- Transform functions – Internal lookup
- Transform functions – Fixed/Dynamic
- Transform functions – Run VBScript
- Transform functions – Simple looping
- Transforms functions – Split-by-type
- Transform functions – Interleaved merge looping
- Transform functions – Node count aggregation
- Transform functions – Sum aggregation