Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am using Kafka as Target and want to add a new custom Header in the Kafka message:
Can anyone please assist that how it can be achieved in Qlik Replicate.
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.
@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 🙂
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.
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!
Hello @shnaqi ,
Exactly. Anyway I'm double-confirming with R&D to see if any workaround. Will keep you posted.
Regards,
John.