cast

The casting agent transforms the input message data into a target-compatible schema.

Example

Given the input:

{
 "field1": "value1", 
 "field2": "value2"
}

With an agent configuration of:

- name: "Cast to a string"
  type: "cast"
  input: "input-topic" # optional
  output: "output-topic" # optional
  configuration:
    schema-type: "string"

The output would be:

{
  "field1": "value1", 
  "field2": "value2"
}

Topics

Input

  • Structured only text ?

  • Implicit topic ?

Output

  • Structured text ?

  • Implicit topic ?

Configuration

LabelTypeDescription

schema-type

string (required)

The target schema type. Only "STRING" is available.

part

string (optional)

When used with KeyValue data, defines if the processing is done on the key or on the value. If null or absent the transform function applies to both the key and the value.

Supported values are “key” or “value”.

Last updated