Double-click the tLogRow component and click the
... button next to Edit
schema.
Add the following columns in the input and copy them to the output, then click
OK.
Column
Type
pages
Integer
results
Integer
Double-click the tHMap component to generate the
map.
In the first step, select Select an existing hierarchical
mapper structure and click Next,
then select the structure you created from the API.
In the second step, keep the default option and click
Next, then click
Finish.
The map is created, you can now configure it.
Click the output row element and drag a
FixedLoop function in its Loop
tab.
Drag the input total_records element to the output
results element, and the input total_pages
to the output pages.
Click the output root element and open the
Util tab, then drag and drop a
PutValueToExternalMap function in it.
Drag and drop a Constant function on the
Key argument, double-click it and define the name of
the variable, total.pages for example.
Drag and drop an XPathFunction function on the
Value argument, double-click and enter
xs:integer(%v) in the
Function/Arguments field.
In this example, the variable created should be an Integer, however, the
PutValueToExternalMap produces a String by default.
In order to use the variable as an Integer, you need to add the
XPathFunction function to define it as a
BigInteger.
Drag and drop the input total_pages element on the
XPathFunction.
Save the map.
Results
The first part of the Job is configured, and you can run it to check the results. In
the next steps, you will use the variable in another component.
Did this page help you?
If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!