Unable to explode JSON Array for kafka-scylla sink connector

Hey everyone,

I am developing a connector which connector my Kafka topic to my scyllaDB Table. That is it reads data from kafka topic and populate into scylla Table.
Now I got stuck in a place, where I have to read an Array of Json for a particular field. Also this array of json contains one of the primary key for my table, so it should create a new row for each element in the array. You can get and Idea for the same with the below example.

Example:

{
  "dealId": "wwww",
  "data": [
    {
      "userId": "xxxx",
      "brandName": "xxxx",
      "brandId": xx,
      "displayName": "xxxx"
    },
    {
      "userId": "yyyy",
      "brandName": "yyyy",
      "brandId": yy,
      "displayName": "yyyy"
    }
  ]
}

Now I have to insert data into the table such that for each element in data there should be a new unique row in table. The primary key for row is dealId, userId.
For example, new rows will be like:

dealId   userId
wwww     xxxx
wwww     yyyy

Can anyone help with there expertise/documentation.
Thanks in Advance for your valuable time :blush:.

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