TreeElement Transform

This transform is used to transform elements, attributes, and consolidations of a tree-based data source.

It is comparable to the FieldTransform for table-based data sources. The element-wise transformations are defined using a so-called function e.g. Replace, Lookup, or Concatenate. One or more fields from the source are converted into one output field. Functions can be implemented one after the other within a transform, i.e. the result of one function can be the input of another function.

The source data can be any tree-based extract or transform and will be processed element by element using the PCWAT-format.
So, these input fields should be provided:
:parent
:child
:weight
:nodetype

Optional: one field for each attribute with its attribute name.

The attribute table defines the attributes of the resulting tree. Each attribute requires the following settings :
- Attribute Name : An arbitrary name
- Input : < the same as in FieldTransform>
If no attribute table is defined, all attributes of the tree-based source plus all functions (except those starting with ":" ) are attributes of the resulting tree.

Note: when the input is coming dynamically from the Source or Transform, but the "Field name" is left empty, the name of the source column/ function is used for the Field name. When the target is manually defined as constant, then the name "constant" is chosen instead of the value from the "Input" field. Adding more than one constant column results in error, because there would be two columns with the name "constant."

For descriptions of the individual function types, follow the links below:

Aggregation Concatenation DateDuration
DateFormat Groovy JavaScript
LastNonEmpty Lookup LookupInterval
Map NumberFormat OlapData
Previous Replace RowNumber
Split SubString Switch
UpperLower  

Setting

Subtree for function evaluation:
This defines the part of the tree-source for which the functions are evaluated with filter conditions like in transform TreeView. If not set, the functions are evaluated for the whole tree-source.

Note:
For the script functions Groovy and JavaScript there is a specific API method for tree element handling available. It delivers information on the hierarchical structure, for example a list of children and parents of an element. More details see the article Integrator Scripting API.

For further usecases you can import the Jedox Integrator project sampleTreeElement from <Jedox_install_path\tomcat\webapps\etlserver\data\samples>.

Updated April 8, 2025