Skip to main content

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

TransformationDescription
JSONToXMLConverts JSON payloads into XML documents.
XMLToJSONConverts XML payloads into JSON.
JsonToValueExtracts 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:

TransformationDescription
noneNo transformation applied.
JMSProtocolConverts events into Apache AMQP JMS-style messages.
JsonMessageEncodes the full MAPS event as JSON (including headers, payload, metadata).
BinaryMessageEncodes the event into a binary representation (efficient transfer).
SchemaToJsonUsed 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.