Post sync scripts


Post sync scripts are written in CQL and can be added to the end of a sync to allow you to do more with your data, such as inserted retrieved values into a Cinchy table.


This example takes you through a batch data sync using the Cinchy Table [Product].[Names Test]. This scenario uses the following API as the destination:

When you run the batch job, it will check for updates in the source table. These updates trigger the REST API to fetch our defined value, which we can use in a post-sync script. In this example, the script will insert this value into a second table, [Product].[Response Table].

The following steps will walk you through how to use this functionality.

  1. Set up your data sync to a REST API. You can review the Source (Image 1), Destination (Image 2), and Sync Behaviour (Image 3) below.

  1. Under the Post Sync tab, input the CQL that takes the defined variable from the REST API and insert it into the [Product].[Response Test] table (Image 4).

  1. Add in your Permissions and click Save.

  2. After you configure the sync, run the job. It will check for new data in the Name column on the [Product].[Names] table (Image 5). When found, it will trigger the REST API to GET the “value” variable. The post sync script will take that value and INSERT it into the [Product].[Response Test] table (Image 6).

Last updated