scrollbar |
---|
Simple
Input
- inputVariable ( 1 or more input time series)
...
This transformation will perform a simple merge operation that functions as a data hierarchy. The picture below shows the functionality of a merge operation. First the most important time series is evaluated, if a value exists at a time in this series then this value will be used. If this is not the case, the second time series (series 2 in the example), will be evaluated. This procedure will continue until a valid value is found in one of the time series or until all time series are evaluated. If no valid value exists at time x in all of the input time series then a missing value will be returned unless the user has specified a default value with the fillGapConstant option.
The hierarchy of the input will be determined by the order in which in input time series are listed in the
configuration. In the configuration example inputA would be evaluated first before inputB. The fillGapConstant function can be used to fill missing values which are present in
Comments
If comments are provided in the input time steps, they will be copied to the output time series steps after the merge operation with a predefined constant value.
Configuration example
transformation is done.
Configuration example
Overwriting 'Manual Unreliables'
In version 2014.02 the functionality 'keepManualUnreliables' was added. If this element is set to true (default), than values that have been manually set to unreliable will remain in the output timeseries. However, if this element is set to false then these manual unreliables will be percieved as missings.
Overruling flags
In version 2014.02 the functionality 'overrulingSourceFlag' and 'overrulingQualityFlag' was added. These elements can be added to an input variable to either override the flag source (original,completed,corrected) the flag quality (reliable, doubtful, unreliable) or both. In the following example the source flag of timeSeries inputA will be set to completed. the quality flag of timeSeries inputB will be set to reliable.
<transformation id="MergeSimpleWithQualityAndOutputFlags">
<merge>
<simple>
<inputVariable>
<variableId>inputA</variableId>
<overrulingSourceFlag>completed</overrulingSourceFlag>
</inputVariable>
<inputVariable>
<variableId>inputB</variableId>
<overrulingQualityFlag>reliable</overrulingQualityFlag>
</inputVariable>
<outputVariable>
<variableId>output</variableId>
</outputVariable>
</simple>
</merge>
</transformation>
Reverse merge order
It is possible to reverse the order of the merge by using a boolean location attribute.
An example is given below:
Code Block | ||
---|---|---|
| ||
<transformation id="MAP">
<merge>
<simple>
<inputVariable>
<variableId>ADAM4_MAP_6</variableId>
</inputVariable>
<inputVariable>
<variableId>ADAM4_MAPX_6</variableId>
</inputVariable>
<reverseOrderAttributeId>attributeId</reverseOrderAttributeId>
<outputVariable>
<variableId>ADAM4_MAP_6_MAP</variableId>
</outputVariable>
</simple>
</merge>
</transformation> |
This option is usually used in combination with location attribute modifiers. The default value is then usually set to false.
By applying a location attribute modifier it is possible to reverse the merge order.