Operator AvroToJSON
- Avro Schema Embedded: The operator processes a blob which contains one or more Avro messages and has the schema embedded. This is the pattern when Avro objects are read from a file (either local file system or HDFS). Every Avro object in the blob is converted to JSON and then submitted to the output port. This operation mode is entered if both parameters avroMessageSchemaFile and avroKeySchemaFile are not existing or have an empty value.
- No Avro Schema Embedded: The operator processes an Avro Blob containing a single message and with no embedded schema. This is the pattern when Avro objects are passed over messaging infrastructure such as Apache Kafka. This operation mode is entered if one or both parameters avroMessageSchemaFile and avroKeySchemaFile are specified.
Summary
- Ports
- This operator has 1 input port and 1 output port.
- Windowing
- This operator does not accept any windowing configurations.
- Parameters
- This operator supports 6 parameters.
Optional: avroKeySchemaFile, avroMessageSchemaFile, inputAvroKey, inputAvroMessage, outputJsonKey, outputJsonMessage
- Metrics
- This operator does not report any metrics.
Properties
- Implementation
- Java
- Ports (0)
-
Port that receives the Apache Avro data blocks. Window punctuation markers are passed to the output port.
- Properties
-
- Optional: false
- ControlPort: false
- WindowingMode: NonWindowed
- WindowPunctuationInputMode: Oblivious
- Assignments
- Java operators do not support output assignments.
- Ports (0)
-
Port that produces tuples with the JSON message string and optionally with the JSON key string. Window punctuation markers are forwarded from the input port.
- Properties
-
- Optional: false
- WindowPunctuationOutputMode: Generating
Optional: avroKeySchemaFile, avroMessageSchemaFile, inputAvroKey, inputAvroMessage, outputJsonKey, outputJsonMessage
- avroKeySchemaFile
-
File that contains the Avro schema to deserialize the binary Avro key. If this parameter is non empty, the operator works in mode No Avro Schema Embedded.
- Properties
-
- Type: rstring
- Cardinality: 1
- Optional: true
- avroMessageSchemaFile
-
File that contains the Avro schema to deserialize the binary Avro message. If this parameter is non empty, the operator works in mode No Avro Schema Embedded.
- Properties
-
- Type: rstring
- Cardinality: 1
- Optional: true
- inputAvroKey
-
The input stream attribute which contains the input Avro key blob. This attribute must be of type blob. If not specified, the default attribute is avroKey.
- Properties
-
- Type: rstring
- Cardinality: 1
- Optional: true
- inputAvroMessage
-
The input stream attribute which contains the input Avro message blob. This attribute must be of type blob. Default is the sole output attribute when the schema has one attribute otherwise avroMessage.
- Properties
-
- Type: rstring
- Cardinality: 1
- Optional: true
- outputJsonKey
-
The output stream attribute which contains the output JSON key string. This attribute must be of rstring or ustring type. If not specified, the default attribute is jsonKey.
- Properties
-
- Type: rstring
- Cardinality: 1
- Optional: true
- outputJsonMessage
-
The output stream attribute which contains the output JSON message string. This attribute must be of rstring or ustring type. Default is the sole output attribute when the schema has one attribute otherwise jsonMessage.
- Properties
-
- Type: rstring
- Cardinality: 1
- Optional: true
- Operator class library