Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
murali23krishna
Contributor III
Contributor III

How to make transaction id as custom key from the header data for the event

We have a scenario where we do not want to use the table primary key as the key, instead, I would want to use the transaction id present in the headers, is there a way to achieve it by using transformations?

Labels (1)
7 Replies
DesmondWOO
Support
Support

Hi @murali23krishna ,

Thanks for reaching Qlik community.

On the transformation page, you can add a new column with $AR_H_TRANSACTION_ID value to get the transaction ID. However, 

1. There is no transaction ID for full load. It will cause skewed data to one partition.
2. A discrepancy exists between $AR_H_TRANSACTION_ID and Kafka's transactionId. For example,

$AR_H_TRANSACTION_ID : "E0FAB00100000000"
Kafka's header transactionId: "E0FAB001000000000000000000000000"

Regards,
Desmond

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

Is this $AR_H_TRANSACTION_ID  is unique for every transaction or it can be duplicated across?

DesmondWOO
Support
Support

Hi @murali23krishna ,

According to the user guide , the uniqueness of the Transaction ID is not guaranteed.

Regards,
Desmond

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

Is there any other field from the header can be used as unique field?

DesmondWOO
Support
Support

Hi @murali23krishna ,

Which source database are you using?

Regards,
Desmond

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

It is a oracle database

DesmondWOO
Support
Support

Hi @murali23krishna ,

You can try $AR_H_CHANGE_SEQ. Please be aware that resuming the task from a previous position will result in a different change sequence for the same record.

Regards,
Desmond

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