Environment
Qlik Replicate
#MYSQL Source
Once we stop the task, we can find the below lines at the end of the task log. Collect stream position and last source timestamp.
00015484: 2022-03-24T19:25:08:107263 [SORTER ]I: Final saved task state. Stream position USREM-HDW-bin.000015:737:-1:768:64424509985:USREM-HDW-bin.000015:612, Source id 8, next Target id 25, confirmed Target id 21, last source timestamp 1648163672000000 (sorter.c:770)
00000432: 2022-03-24T19:25:08:107263 [SOURCE_CAPTURE ]T: Entering 'mysql_endpoint_free_imp' (mysql_endpoint_imp.c:787)
.
.
.
.
00026340: 2022-03-24T19:25:18:786141 [AT_GLOBAL ]I: Closing log file at Thu Mar 24 19:25:18 2022 (at_logger.c:2535)
Ex: Stream position USREM-HDW-bin.000015:737:-1:768:64424509985:USREM-HDW-bin.000015:612
last source timestamp 1648163672000000
Now convert these values to be compatible with replicate.
- Always take the first part from the stream position which represents MySQL bin log name (USREM-HDW-bin.000015) and position (737) inside the bin log.
Stream position USREM-HDW-bin.000015:737:-1:768:64424509985:USREM-HDW-bin.000015:612 -->
Source change position (e.g., SCN or LSN): USREM-HDW-bin.000015:737
2. Convert last source timestamp to time stamp using epoch converter.
Below is the last source timestamp from the task log:
last source timestamp 1648163672000000 --> Thursday, 24 March 2022 19:14:32 From <https://www.epochconverter.com/>