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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Ole_Dufour
Creator
Creator

Execute custom script

Subsequent to executing a full load task we wish to execute a custom sql script or pl/script in our target database (Oracle).
Is this possible within Qlik Replicate? Couldn't find the option.

Thanks.

Labels (2)
1 Solution

Accepted Solutions
Heinvandenheuvel
Specialist III
Specialist III

@john_wang 's suggestion is best when the timing for the post full-load action is critical.

There is no program/script trigger option best I know. Closest you can possibly get is to setup a server notification for a Custom  EMAIL to be send (Or Windows Event Log entry to be created)  with the task name. The Email receiving system can then hopefully trigger an action.

[server] -> [Notifications] -> [+ New Notification ] -> [Tasks Events] -> [ Select a notification event ]

- Name: full load done

- Processing Status -  [x] Task was stopped after Full Load: Cached changes were applied

If the need is just for 'some actions soon after full load' then there are more possible solution with polling techniques.

- REPCTL or AEM RestAPI script to check for task status full-load finished to be after  a stashed away 'last time checked' value.

- Shell / SQL script to check for the existence of a marker table like 'ZZZ_full_load_done' and delete that table (on target) when triggered actions are complete. Give the marker table the highest name in your sort order, and give it the lowest full-load priority. Note that this is still no 100% reliable as one typically loads with multiple streams and the 'last' table could already be done picked up by an idle thread while some other thread is still finishing up a large table load. That all depends on the application.

Hein.

View solution in original post

2 Replies
john_wang
Support
Support

Hello @Ole_Dufour ,

Thanks for reaching out here!

There are 2 options under functionality of Stopping the Task after Full Load, you may use one of them to stop the task after Full Load done, execute the house keeping jobs on the target side then RESUME the task to continue the CDC stage.

The screen copy of the function:

john_wang_0-1690796784963.png

Hope this helps.

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

@john_wang 's suggestion is best when the timing for the post full-load action is critical.

There is no program/script trigger option best I know. Closest you can possibly get is to setup a server notification for a Custom  EMAIL to be send (Or Windows Event Log entry to be created)  with the task name. The Email receiving system can then hopefully trigger an action.

[server] -> [Notifications] -> [+ New Notification ] -> [Tasks Events] -> [ Select a notification event ]

- Name: full load done

- Processing Status -  [x] Task was stopped after Full Load: Cached changes were applied

If the need is just for 'some actions soon after full load' then there are more possible solution with polling techniques.

- REPCTL or AEM RestAPI script to check for task status full-load finished to be after  a stashed away 'last time checked' value.

- Shell / SQL script to check for the existence of a marker table like 'ZZZ_full_load_done' and delete that table (on target) when triggered actions are complete. Give the marker table the highest name in your sort order, and give it the lowest full-load priority. Note that this is still no 100% reliable as one typically loads with multiple streams and the 'last' table could already be done picked up by an idle thread while some other thread is still finishing up a large table load. That all depends on the application.

Hein.