Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
shnaqi
Contributor II
Contributor II

Qlik Replicate | Adding a custom Header in Kafka Message

I am using Kafka as Target and want to add a new custom Header in the Kafka message:

shnaqi_0-1716894038729.png

Can anyone please assist that how it can be achieved in Qlik Replicate.

Labels (2)
5 Replies
john_wang
Support
Support

Hello @shnaqi ,

Welcome to Qlik Community forum and thanks for reaching out here!

I'm assuming you want to add an additional calculated column to the Kafka message, we have a sample article: How to add tables name in Kafka message.

Hope this helps.

John.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!
shnaqi
Contributor II
Contributor II
Author

@john_wang , Thanks for the response, I went through the shared article. Actually i am looking to add a custom header in the message instead of adding a column in the data("customerHeader": "customValue"). PFB example for reference:

{
"data": {
"CUSTOMERREF": "206.0000000000",
"DESCRIPTION": "TESTING",
"ACTION": "INSERT"
},
"beforeData": null,
"headers": {
"customerHeader": "customValue",
"operation": "INSERT",
"changeSequence": "20240528082007000000000000000000005",
"timestamp": "2024-05-28T08:20:05.000",
"streamPosition": "00000db9.3f2abeb7.00000001.0000.02.0000:4021.301196.16",
"transactionId": "00000000000000000000000000050023",
"changeMask": "1F",
"columnMask": "1F",
"transactionEventCounter": 1,
"transactionLastEvent": true
}
}

I hope this JSON example will clarify my need 🙂

john_wang
Support
Support

Hello @shnaqi ,

Thanks for the update.

If I understand correctly, you hope the additional calculated column appears in the "headers" part rather than "data" part. is that correct?

If yes, then the pre-built headers (in your picture) can be appeared in "headers" part (see item 4 in article  How to add tables name in Kafka message). The other additional calculated column appears in "data" part (items 1 - 3 in the article).

Regards,

John.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!
shnaqi
Contributor II
Contributor II
Author

So it clarifies my question that i can only use the prebuilt headers but Custom headers cant be added in the headers. Thanks for the clarification!

john_wang
Support
Support

Hello @shnaqi ,

Exactly. Anyway I'm double-confirming with R&D to see if any workaround. Will keep you posted.

Regards,

John.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!