# Number of Records in a single Kafka Message

**URL:** <https://forum.confluent.io/t/number-of-records-in-a-single-kafka-message/7214>\
**Category:** Kafka Connect\
**Created:** [10 February 2023 14:01 UTC](https://forum.confluent.io/t/number-of-records-in-a-single-kafka-message/7214 "2023-02-10T14:01:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevinmat](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/kevinmat/32/2736_2.png) [@kevinmat](https://forum.confluent.io/u/kevinmat)\
**Post date:** [10 February 2023 14:01 UTC](https://forum.confluent.io/t/number-of-records-in-a-single-kafka-message/7214/1 "2023-02-10T14:01:27Z")

</div>

HI,  
I have a Kafka Message which contains JSON content and contains multiple rows(JSON documents) of the same structure to be ingested into a Snowflake Table. I need each row in the table to correspond to each JSON document within the Kafka Message.(which contains thousands of JSON documents)  
I wanted to know there is any way to split the Kafka Message so that it will contain a single JSON document and it can then be ingested as a single row in Snowflake Table. Even better if I could flatten the JSON document contained in the Kafka message into individual columns in Snowflake table it would save me creating a Snowflake Procedure to process the JSON document and store it.  
I am currently using Kafka Connect Snowflake Sink Connector for the same , however since the split and flattening is something I am not aware about if supported by the Sink Connector , I need to create intermediate staging table in Snowflake to hold the Kafka message and then run it through a Stored procedure to flatten and store into Snowflake table which is a lot of processing cost on Snowflake, so I was looking for a solution in Kafka Connect to achieve the same if possible?

Other Solution I thought of creating my custom process which can pick messages from Kafka and flatten them and use JDBC to insert/update into Snowflake table , however again I need to write my own logic and instead if the the Sink Connector can help in the same I can save on me maintaining the code for this seperate process and re-use an existing Snowflake Sink Connector for the same

Thanks,  
Kevin

---

<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:** [12 March 2023 14:01 UTC](https://forum.confluent.io/t/number-of-records-in-a-single-kafka-message/7214/2 "2023-03-12T14:01:41Z")

</div>

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