Tech Tip: Creating pre-publish and post-publish actions in Datamaker

Discussion created by Sameer_Chandragiri Employee on Oct 21, 2015

There is often a requirement to perform an action or group of actions before (and/or after) publishing from a data pool. For example, in some cases it may help overall performance if triggers are disabled before the publish job and then re-enabled after the publish (of course, extreme care has to be taken to inspect what the triggers do exactly as they may perform other inserts that the application depends on later).


The steps to create these actions are below: (This specific scenario deals with creating an action for a disable trigger DDL statement. Similiar steps may be applied for executing SQL statements or system commands for example)


1.Right-click on the data pool and select “Maintain actions”.

1-maintain actions.jpg



2.Click on the green plus button to add a new action.
3.Choose Code Type “DDL”.


4.Provide a name for the action and click ‘OK’.
5.For “Action type”, select “Pre-publish”; select the appropriate DB connection; enter the required DROP TRIGGER/ALTER TABLE command next to “Code”.


6.You may do a test run of this action by clicking on the "running-man" button.
7.Save the action.
8.Perform the similar steps for creating a post-publish action; but select Action Type as “Post-publish” instead, and the appropriate code (DDL) statement.


Each time the data pool is published, the pre and post actions created will be executed before and after the publish respectively.