Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More

How to RESUME Hana trigger-based CDC task

100% helpful (1/1)
cancel
Showing results for 
Search instead for 
Did you mean: 
john_wang
Support
Support

How to RESUME Hana trigger-based CDC task

Last Update:

Dec 22, 2022 10:33:53 AM

Updated By:

Sonja_Bauernfeind

Created date:

Sep 13, 2021 11:49:17 PM

In some scenarios we need stop and resume a task. However for Hana trigger-based CDC task, if the option "Use log table" is enabled, resuming the task, or while you trying to startup the task from a given timestamp, you may get the below information (with SOURCE_CAPTURE set to Trace):

 

2021-09-09T22:12:34:881897 [SOURCE_CAPTURE  ]T:  Resume from 'timestamp:2021-09-09T20:30:00'
2021-09-09T22:12:34:881897 [SOURCE_CAPTURE  ]T:  Start from timestamp is not supported in the Log-Table mode

 

 

Environment

  • Replicate versions 6.6/7.0
  • Replicate version   2021.5

 

The option "Use log table" is enabled by an Internal Parameter in versions 6.6/7.0. In version 2021.5 it's in GUI property like below:

              john_wang_0-1631590321925.png

 

Resolution

Start the task by source change position, rather than the timestamp. Here is a query to prepare the stream position in the correct format by a timestamp:

;Get the stream position by timestamp
;Before using the query, please replace the $SCHEMA$ to your artifacts schema where the table "attrep_cdc_log" is located.
;The timestamp format is 'YYYY-MM-DD HH:MM:SS' (Note, the timestamp should be the one on HAHA Server side, not the replicate server's)
;The range will be from the first (not included) event that happened after the time specified to the last (included) event in the table

 

SELECT 'V1:'||MIN("$rowid$")||':'||MAX("$rowid$")||':0:'||MIN("$rowid$") AS "STREAM POSITION" from "$SCHEMA$"."attrep_cdc_log" WHERE "CHANGE_EVENT_TIME" >= 'YYYY-MM-DD HH:MM:SS'

 

A unique row will be returned:

 

V1:670636:686112:0:670333

 

Then in the Replicate UI, start the task by source change stream position:

            john_wang_1-1631591125242.png

 

Internal Investigation ID

Salesforce support case #02260694.

Labels (1)
Comments
Al_gar
Contributor III
Contributor III

@john_wang 

Is this process still the way to go with Replicate 2022.11.0.628? Asking because we have a HANA trigger-based CDC task and we were hoping that we could just use EM API in a script that would automate the stop and resume actions.

john_wang
Support
Support

Hello @Al_gar ,

Thanks for the following up.

Yes, it should work. Feel free to let us know if you need any additional assistance.

Regards,

John.

Version history
Last update:
‎2022-12-22 10:33 AM
Updated by: