@@ -77,42 +77,42 @@ batch when the record was read. It will also contain a field named 'key' which w
7777the message key in it. It parses the Kafka messages using the 'csv' format
7878with 'user', 'item', 'count', and 'price' as the message schema.
7979
80- {
81- "name": "Kafka",
82- "type ": "streamingsource ",
83- "properties ": {
84- "topics ": "purchases",
85- "brokers ": "host1.example.com:9092,host2.example.com:9092 ",
86- "format ": "csv ",
87- "timeField ": "readTime ",
88- "keyField ": "key ",
89- "schema ": "{
90- \"type\":\"record\",
91- \"name \":\"purchase \",
92- \"fields \":[
93- {\"name \":\"readTime\",\"type\":\"long\"},
94- {\"name\":\"key \",\"type\":\"bytes \"},
95- {\"name\":\"user \",\"type\":\"string \"},
96- {\"name\":\"item \",\"type\":\"string\"},
97- {\"name\":\"count \",\"type\":\"int \"},
98- {\"name\":\"price \",\"type\":\"double \"}
99- ]
100- }"
101- }
80+ ``` json
81+ {
82+ "name " : " Kafka " ,
83+ "type " : " streamingsource " ,
84+ "properties " : {
85+ "topics " : " purchases " ,
86+ "brokers " : " host1.example.com:9092,host2.example.com:9092 " ,
87+ "format " : " csv " ,
88+ "timeField " : " readTime " ,
89+ "keyField " : " key " ,
90+ "schema" : "{
91+ \"type \":\"record \",
92+ \"name \":\"purchase\",
93+ \"fields \":[
94+ {\"name\":\"readTime \",\"type\":\"long \" },
95+ {\"name\":\"key \",\"type\":\"bytes \" },
96+ {\"name\":\"user \",\"type\":\"string\" },
97+ {\"name\":\"item \",\"type\":\"string \" },
98+ {\"name\":\"count \",\"type\":\"int \" },
99+ { \"name\":\"price\",\"type\":\"double\" }
100+ ]
101+ }"
102102 }
103+ }
104+ ```
103105
104106For each Kafka message read, it will output a record with the schema:
105107
106- +================================+
107- | field name | type |
108- +================================+
109- | readTime | long |
110- | key | bytes |
111- | user | string |
112- | item | string |
113- | count | int |
114- | price | double |
115- +================================+
108+ | field name | type |
109+ | ----------- | ---------------- |
110+ | readTime | long |
111+ | key | bytes |
112+ | user | string |
113+ | item | string |
114+ | count | int |
115+ | price | double |
116116
117117Note that the readTime field is not derived from the Kafka message, but from the time that the
118118message was read.
0 commit comments