Transformations
MAPS Transformations allow you to modify, enrich, or convert event payloads inline as they move through the system.
Capabilities
- Field mapping – rename, extract, or drop fields.
- Unit conversion – e.g., Fahrenheit → Celsius.
- Enrichment – add metadata such as serverId, geo tags, or custom attributes.
- Format conversion – JSON ↔ Avro ↔ Protobuf ↔ CSV (schema-driven).
- Protocol message conversion – encode/decode full events into different wire representations.
Schema Awareness
- With a schema, MAPS applies type-aware transforms (numeric conversions, field extraction, validation).
- Without a schema, only opaque, byte-level transformations are possible.
Transformation Flow
Built-in Transformations
Transformation | Description |
---|---|
JSONToXML | Converts JSON payloads into XML documents. |
XMLToJSON | Converts XML payloads into JSON. |
JsonToValue | Extracts a specific value from a JSON object by key. |
Example: Schema-Aware Unit Conversion
transformations:
- field: temperatureF
convertTo: temperatureC
function: fahrenheitToCelsius
Example: Topic/Protocol-Scoped Transformations
transformations:
data:
- pattern: "*://*/*/*"
transformation: ""
- pattern: "*://*/mqtt/thermometer"
transformation: JsonToValue
key: temperature
- pattern: "*://*/mqtt/xml_source"
transformation: XMLtoJSON
- pattern: "*://*/mqtt/xml_sink"
transformation: JSONToXML
These rules apply per topic/protocol/host pattern, allowing localized transformations.
Protocol Message Transformations
At the event ingress/egress boundary, transformations can be applied to entire protocol messages:
Transformation | Description |
---|---|
none | No transformation applied. |
JMSProtocol | Converts events into Apache AMQP JMS-style messages. |
JsonMessage | Encodes the full MAPS event as JSON (including headers, payload, metadata). |
BinaryMessage | Encodes the event into a binary representation (efficient transfer). |
SchemaToJson | Used for server↔server schema exchange and replication. |
Where Used
- Client connections – inbound/outbound per topic or protocol.
- Inter-server connections – bridge traffic transformed before routing.
- Pipelines – prepare payloads for downstream filtering or statistics.