Data Wrangling REST Comma Separated JSON (CSJ) Data

I’m attempting to use the Kafka Connect REST connector to poll an endpoint every 10 seconds, AVROize the data, and sink with a database. To do so, I’m working through the blog tutorial " Data Wrangling with Apache Kafka and KSQL" (Data Wrangling with Apache Kafka and KSQL | Confluent) and have hit a snag.

The REST API returns a “Comma Separated JSON (CSJ)” message, like the following:

{“time”:1663867330,“person”:[
[“Robert”,“Smith”,“United States”,“NY”,“Stetson”,1984,7,23,false,null,true,0],
[“Linda”,“Crabb”,“United States”,“CA”,“Seaside”,1964,9,16,true,null,true,0]]}

As one can see, there are no keys for the values. I’m at a standstill at the point in the tutorial where I’m “Declaring The Schema” with KSQL.

Question: Since I do not have a key as a reference, is there a way to reference by index? For example:


0 VARCHAR,
1 VARCHAR,
2 VARCHAR ,

Or is there another way?

Thank you for your help.

Stephen

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.