Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
cdc
Partner - Contributor III
Partner - Contributor III

Full load Attunity Timestamp

Hi all,

 

Does Full Load message contain attunity timestamp? if not, is it possible to set it?

Thanks

Akbar

Labels (4)
2 Solutions

Accepted Solutions
Yadunandan
Support
Support

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

Header columns

Using global transformation

Regards,
Yadunandan 

View solution in original post

john_wang
Support
Support

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

john_wang_0-1708673728726.pngjohn_wang_1-1708673763951.pngjohn_wang_2-1708673785374.pngjohn_wang_3-1708673808191.pngjohn_wang_4-1708673830723.png

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:

john_wang_5-1708674060469.png

 

I 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!

View solution in original post

10 Replies
john_wang
Support
Support

Hello @cdc ,

Yes maybe we can. What's the source and target database? We'd like to confirm for you.

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!
Yadunandan
Support
Support

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

Header columns

Using global transformation

Regards,
Yadunandan 

cdc
Partner - Contributor III
Partner - Contributor III
Author

Hi,

Oracle as source and kafka as target.

Thank you

cdc
Partner - Contributor III
Partner - Contributor III
Author

Hi,

 

Can you explain step by step in global rules to set this full load timestamp? appreciate with the help. Thank you

 

Akbar

john_wang
Support
Support

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

john_wang_0-1708673728726.pngjohn_wang_1-1708673763951.pngjohn_wang_2-1708673785374.pngjohn_wang_3-1708673808191.pngjohn_wang_4-1708673830723.png

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:

john_wang_5-1708674060469.png

 

I 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!
cdc
Partner - Contributor III
Partner - Contributor III
Author

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

john_wang
Support
Support

Hello @cdc ,

In CDC stage, you need use a header column AR_H_COMMIT_TIMESTAMP, for example:

john_wang_0-1708675316202.png

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!
Heinvandenheuvel
Specialist III
Specialist III

>>> 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.

cdc
Partner - Contributor III
Partner - Contributor III
Author

Hi John,

 

Thank you for your help, it works!

 

Akbar