Transform Definition
What
Next to an Enrichment Definition and Distribution Definition, we can also define a Transform Definition

When a transform Definition is defined, at creation/ingestion and after enrichment and distribution the events will be further processed.
A shadowItem is created if not yet existing to which the transformed events belong. The original item will contain in the data block a reference to this shadowItem
In order to work: indexSetCodeType ‘eventOrigin’ has to exist and the IndexSetCodes:
- ORIGINAL → added to the original event
- DISTRIBUTED → added to an event created with a distributionDefinition
- TRANSFORMED → added to an event created with a transformDefinition
Where
A transformDefinition can be configured on a Timeseries Definition.
Example
{
"timestampTransform": {
"timeZone": "UTC" // time zone for shadow Item (difference in h between origal and this will be used to shift)
},
"valueTransforms": {
"Kilogram CO2 to Kilometer": {
"parentValueTransform": "Kilometer to Kilogram CO2", // transform on transformed event
"shadowItemUnit": "KILOMETER",
"shadowItemNamePrefix": "KM-",
"shadowItemExternalIdPrefix": "KM-",
"timeseriesTransform": {
"standardUnit": "KILOGRAM", // If the standard unit differs from the original item unit then first a conversion is performed using the UoM service
"externalId": "timeseriesShadowItem2" // The external id of the time series to use for transformation
},
// Index set codes to be set on the new transformed event
"indexSetCodes": [
{
"type": "trans",
"code": "T2"
}
],
// Index set codes to be set on the new transformed event derived from item fields.
// Item fields with index set codes are supported. Single value fields as wel as list value fields are supported. Examples: {{itemType}}, {{itemAction}}, ...
// Additionally the item 'metaIndexSetCodes' extension field is supported. In that case an additional filter can be added to select a subset of the meta index set codes.
// Examples: {{metaIndexSetCodes}}, {{metaIndexSetCodes}}.filter('key'), ... (where 'key' = extension field name)
"derivedIndexSetCodes": [
"{{itemType}}",
"{{itemAction}}",
"{{metaIndexSetCodes}}.filter('key')"
]
"keyValueSets": [
{
"key": "kmkey",
"values": [
"kmnotherValue",
"kmvalue"
]
}
]
},
"Kilometer to Kilogram CO2": {
"shadowItemUnit": "KILOGRAM",
"shadowItemNamePrefix": "CO2-",
"shadowItemExternalIdPrefix": "CO2-",
"timeseriesTransform": {
"standardUnit": "KILOMETER",
"externalId": "timeseriesItem2"
},
"indexSetCodes": [
{
"type": "trans",
"code": "T1"
}
],
"keyValueSets": [
{
"key": "co2key",
"values": [
"co2notherValue",
"co2value"
]
}
]
}
}
}
Did this answer your question?
😞
😐
🤩
Last updated on December 27, 2022