# Unable to explode JSON Array for kafka-scylla sink connector

**URL:** <https://forum.confluent.io/t/unable-to-explode-json-array-for-kafka-scylla-sink-connector/11175>\
**Category:** Kafka Connect\
**Created:** [4 August 2024 12:56 UTC](https://forum.confluent.io/t/unable-to-explode-json-array-for-kafka-scylla-sink-connector/11175 "2024-08-04T12:56:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anshul.sharma](https://avatars.discourse-cdn.com/v4/letter/a/74df32/32.png) [@anshul.sharma](https://forum.confluent.io/u/anshul.sharma)\
**Post date:** [4 August 2024 12:56 UTC](https://forum.confluent.io/t/unable-to-explode-json-array-for-kafka-scylla-sink-connector/11175/1 "2024-08-04T12:56:21Z")

</div>

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:

```auto
{
  "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:

```auto
dealId userId
wwww xxxx
wwww yyyy

```

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/confluentcommunity/original/1X/c49438c90c9df282e9996fdf6971be890c71b65a.svg) [@system](https://forum.confluent.io/u/system)\
**Post date:** [3 September 2024 12:56 UTC](https://forum.confluent.io/t/unable-to-explode-json-array-for-kafka-scylla-sink-connector/11175/2 "2024-09-03T12:56:52Z")

</div>

Closed on 3 September 2024 12:56 UTC

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