PowerExchange for Kafka User Guide for PowerCenter

PowerExchange for Kafka User Guide for PowerCenter

Sample Schema Files

Sample Schema Files

The Kafka sources and targets in a session read or write data in JSON or Avro format. The following examples contain samples for each schema format.

Sample JSON Schema

When you import a Kafka source or target definition, specify the format in which the PowerExchange for Kafka reads or writes data. When you specify JSON format, provide a sample JSON file.
The following schema is a sample JSON schema:
{"id" : 1, "name" : "sample"}
The JSON schema must be defined in a single line. If you define a JSON schema that contains more than one line, the session fails.

Sample Avro Schema

When you import a Kafka source or target definition, specify the format in which the PowerExchange for Kafka reads or writes data. When you specify Avro format, provide a sample Avro file.
The following schema is a sample Avro schema:
{ "type": "record", "name": "Tree", "fields": [{ "name": "treestring", "type": "string" }, { "name": "children", "type": ["null","string"], "default": null }]

0 COMMENTS

We’d like to hear from you!