How to split records into different streams, from one topic to different streams?

前端 未结 2 414
梦毁少年i
梦毁少年i 2021-01-27 09:22

I have a single source CSV file containing records of different sizes that pushes every record into one source topic. I want to split the records into different KStreams/KTables

2条回答
  •  借酒劲吻你
    2021-01-27 09:52

    I am able to split the data and used KSQL for the approach that I am sharing below. 1. An input stream is created with value_format='JSON' and a column payload as STRING 2. The payload will contain the whole record as a STRING 3. The record is then split into different streams using LIKE operator in the WHERE clause while putting the payload into different streams as per the requirement. Here I have used SPLIT operator of KSQL to get the records from payload that are in comma-delimited format

提交回复
热议问题