Running a Post Execution Script

You can execute your own SQL script automatically after a table synchronization or consolidation. The script can be used to modify data or create indexes, for example. The script will be executed against the destination table.

To add a post execution script to a table:

  1. Click Extractions on the left.

  2. Click the link in the Tables column for the appropriate extraction (of Synchronization or Consolidation type).

  3. Hover your mouse over the Post Execution Script column of the appropriate table to add your script.

  4. Copy and paste your script in the text box.

    Tip

    The script in the image above uses sp_execute with SQL Server (sp_executesql); this command is useful if you wish to execute several SQL queries concurrently.

  5. Click Save.

  6. Go back to the Extractions page and edit it to make the extraction active again.

Example

In our example, the script is used for exchange rate synchronization. It calls an existing stored procedure in SQL Server. If exchange rates are missing for certain days, the script will insert the missing rates based on the rate of a specific day.