# Getting CL specific fields in database

**URL:** <https://forum.confluent.io/t/getting-cl-specific-fields-in-database/1419>\
**Category:** Self-Managed Connectors\
**Created:** [7 April 2021 15:03 UTC](https://forum.confluent.io/t/getting-cl-specific-fields-in-database/1419 "2021-04-07T15:03:03Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![imk](https://avatars.discourse-cdn.com/v4/letter/i/f19dbf/32.png) [@imk](https://forum.confluent.io/u/imk)\
**Post date:** [7 April 2021 15:03 UTC](https://forum.confluent.io/t/getting-cl-specific-fields-in-database/1419/1 "2021-04-07T15:03:03Z")

</div>

Hi All,

This question is regarding how to get the CL specific fields and store in oracle database table.  
I have a topic where XML message is getting published and it is getting stored in database through JDBC Sink connector.  
However, I also need to store CL key, CL offset, CL partitions and fingerprint along with XML message.

Is there any Kafka parameter to get these details/values from CL or any other way to store these details in oracle database table.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![rmoff](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/rmoff/32/3_2.png) [@rmoff](https://forum.confluent.io/u/rmoff)\
**Post date:** [7 April 2021 16:14 UTC](https://forum.confluent.io/t/getting-cl-specific-fields-in-database/1419/2 "2021-04-07T16:14:22Z")

</div>

Can you define what `CL` means in this context? And perhaps give a sample of the data and example of what you are wanting to stream to the target database?

---

<div class="post-metadata">

**Author:** ![imk](https://avatars.discourse-cdn.com/v4/letter/i/f19dbf/32.png) [@imk](https://forum.confluent.io/u/imk)\
**Post date:** [7 April 2021 16:29 UTC](https://forum.confluent.io/t/getting-cl-specific-fields-in-database/1419/3 "2021-04-07T16:29:02Z")

</div>

CL means communication layer where message is getting published and same is getting stored in database.  
However, can we store key, offset, partition and fingerprint data/values from communication layer in database through JDBC sink connector

---

<div class="post-metadata">

**Author:** ![imk](https://avatars.discourse-cdn.com/v4/letter/i/f19dbf/32.png) [@imk](https://forum.confluent.io/u/imk)\
**Post date:** [9 April 2021 16:14 UTC](https://forum.confluent.io/t/getting-cl-specific-fields-in-database/1419/4 "2021-04-09T16:14:42Z")

</div>

Hi,  
Is there any way to achieve this.

---

<div class="post-metadata">

**Author:** ![rmoff](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/rmoff/32/3_2.png) [@rmoff](https://forum.confluent.io/u/rmoff)\
**Post date:** [12 April 2021 16:19 UTC](https://forum.confluent.io/t/getting-cl-specific-fields-in-database/1419/5 "2021-04-12T16:19:28Z")

</div>

You can use the `InsertField` Single Message Transform to add partition, offset, and topic details.

[![](https://us1.discourse-cdn.com/flex019/uploads/confluentcommunity/original/2X/5/5df6d6d6a251aa0b0b89751fcdd32aad02d87eed.jpeg "🎄Twelve Days of SMT 🎄 - Day 6: InsertField II") ](https://www.youtube.com/watch?v=6XfwZUnZLlI)

Ref: [🎄 Twelve Days of SMT 🎄 - Day 6: InsertField II](https://rmoff.net/2020/12/15/twelve-days-of-smt-day-6-insertfield-ii/)

---

<div class="post-metadata">

**Author:** ![imk](https://avatars.discourse-cdn.com/v4/letter/i/f19dbf/32.png) [@imk](https://forum.confluent.io/u/imk)\
**Post date:** [13 April 2021 08:28 UTC](https://forum.confluent.io/t/getting-cl-specific-fields-in-database/1419/6 "2021-04-13T08:28:24Z")

</div>

Thank you so much.  
Will try this solution.

---

<div class="post-metadata">

**Author:** ![imk](https://avatars.discourse-cdn.com/v4/letter/i/f19dbf/32.png) [@imk](https://forum.confluent.io/u/imk)\
**Post date:** [14 April 2021 06:45 UTC](https://forum.confluent.io/t/getting-cl-specific-fields-in-database/1419/7 "2021-04-14T06:45:45Z")

</div>

It’s working fine.  
Also trying to get the Fingerprint from Kafka same way, but it’s giving an error.  
Is there any specific name for retrieving fingerprint value.

---

<div class="post-metadata">

**Author:** ![rmoff](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/rmoff/32/3_2.png) [@rmoff](https://forum.confluent.io/u/rmoff)\
**Post date:** [14 April 2021 08:55 UTC](https://forum.confluent.io/t/getting-cl-specific-fields-in-database/1419/8 "2021-04-14T08:55:02Z")

</div>

How are you trying to get the values from Kafka?

---

<div class="post-metadata">

**Author:** ![imk](https://avatars.discourse-cdn.com/v4/letter/i/f19dbf/32.png) [@imk](https://forum.confluent.io/u/imk)\
**Post date:** [14 April 2021 09:16 UTC](https://forum.confluent.io/t/getting-cl-specific-fields-in-database/1419/9 "2021-04-14T09:16:09Z")

</div>

Same way as shown in the video using InsertField$value.  
For fingerprint:

```auto
"transforms.insertFingerprint.type" : "org.apache.kafka.connect.transforms.InsertField$value",
"transforms.insertFingerprint.Fingerprint.field": "Kafka fingerprint".

```

Have also added this in “transforms” parameter.  
It’s giving an error as No field insertion configured.

---

<div class="post-metadata">

**Author:** ![imk](https://avatars.discourse-cdn.com/v4/letter/i/f19dbf/32.png) [@imk](https://forum.confluent.io/u/imk)\
**Post date:** [14 April 2021 16:38 UTC](https://forum.confluent.io/t/getting-cl-specific-fields-in-database/1419/10 "2021-04-14T16:38:44Z")

</div>

Is there any different name for that

---

<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:** [21 April 2021 16:39 UTC](https://forum.confluent.io/t/getting-cl-specific-fields-in-database/1419/11 "2021-04-21T16:39:36Z")

</div>

Closed on 21 April 2021 16:39 UTC

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