Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
Does Full Load message contain attunity timestamp? if not, is it possible to set it?
Thanks
Akbar
Hello Akbar,
You can use Global rules to add a column and use AR_H_TIMESTAMP from the expression builder. This will give you Current timestamp value in Full load. You can check the below links for more information
Regards,
Yadunandan
Hello @cdc ,
The detailed steps can be found User Guide Defining global rules. Below is a sample to add a column named FL_time which presents the Full Load Time in Kafka messages.
Start from Task Designer --> Global Rules... , and then
In step 5 we named the new column as FL_time, and its expression in step 4 is:
DATETIME('NOW','+8 hours')
which is the current local time (HK Time, GMT+8 hours). You may custom the expression to fit your local timezone. The result in Kafka sample:
I hope this helps.
John.
Hello @cdc ,
Yes maybe we can. What's the source and target database? We'd like to confirm for you.
Regards,
John.
Hello Akbar,
You can use Global rules to add a column and use AR_H_TIMESTAMP from the expression builder. This will give you Current timestamp value in Full load. You can check the below links for more information
Regards,
Yadunandan
Hi,
Oracle as source and kafka as target.
Thank you
Hi,
Can you explain step by step in global rules to set this full load timestamp? appreciate with the help. Thank you
Akbar
Hello @cdc ,
The detailed steps can be found User Guide Defining global rules. Below is a sample to add a column named FL_time which presents the Full Load Time in Kafka messages.
Start from Task Designer --> Global Rules... , and then
In step 5 we named the new column as FL_time, and its expression in step 4 is:
DATETIME('NOW','+8 hours')
which is the current local time (HK Time, GMT+8 hours). You may custom the expression to fit your local timezone. The result in Kafka sample:
I hope this helps.
John.
Hi John,
Thank you it works! would like to ask a question what if we want the timestamp is when the data is commit in database? what should we replace 'now'? thanks
Akbar
Hello @cdc ,
In CDC stage, you need use a header column AR_H_COMMIT_TIMESTAMP, for example:
Regards,
John.
>>> hat if we want the timestamp is when the data is commit in database?
If you are indeed using Full-load as the topic title suggests then the commit time for individual rows on the source is not available anywhere unless explicitly added by the source application (typically with a date-time field defaulting to SYSDATE). As minor approximation one can use thing likes ROWID on certain source databases but that's not reliable.
Using CDC the insert and commit time are available in the header as previously explained.
Hi John,
Thank you for your help, it works!
Akbar