Post Sync
This page lets you add post sync scripts
Last updated
This page lets you add post sync scripts
Last updated
You can add post sync scripts to be executed at the end of a data sync. Below is an example in the Connections experience version followed by the XML equivalent:
Post Sync Scripts are only supported for Cinchy and Dynamics targets.
<?xml version="1.0" encoding="utf-16" ?>
<BatchDataSyncConfig name="PostScriptsUsage" version="1.0.0" xmlns="http://www.cinchy.co">
<Parameters />
<ExcelDataSource headerRowsToIgnore="0" path="C:\Temp\Sample.xlsx">
<Schema>
<Column name="Col1" ordinal="1" dataType="Text" isMandatory="false" maxLength="500" validateData="false"/>
<Column name="Col2" ordinal="2" dataType="Text" isMandatory="false" maxLength="500" validateData="false"/>
<Column name="Col3" ordinal="3" dataType="Text" isMandatory="false" maxLength="500" validateData="false"/>
</Schema>
</ExcelDataSource>
<CinchyTableTarget model="" domain="Test" table="ExcelTable" suppressDuplicateErrors="true" >
<PostSyncScripts>
<PostSyncScript name="TestPost" timeout="200">
<CQL>Update [Test].[ExcelTable] SET [Col3]='It worked' where [Deleted] is null</CQL>
</PostSyncScript>
</PostSyncScripts>
<ColumnMappings>
<ColumnMapping sourceColumn="Col1" targetColumn="Col1" />
<ColumnMapping sourceColumn="Col2" targetColumn="Col2" />
<ColumnMapping sourceColumn="Col3" targetColumn="Col3" />
</ColumnMappings>
<SyncKey>
<SyncKeyColumnReference name="Col1" />
</SyncKey>
<NewRecordBehaviour type="INSERT" />
<ChangedRecordBehaviour type="UPDATE" />
<DroppedRecordBehaviour type="DELETE"/>
</CinchyTableTarget>
</BatchDataSyncConfig>
<?xml version="1.0" encoding="utf-16" ?>
<BatchDataSyncConfig name="PostScriptsUsage" version="1.0.0" xmlns="http://www.cinchy.co">
<Parameters>
<Parameter name="SheetNameParam" />
</Parameters>
<ExcelDataSource headerRowsToIgnore="0" path="C:\Temp\Sample.xlsx" sheetName="@SheetNameParam" >
<Schema>
<Column name="Col1" ordinal="1" dataType="Text" isMandatory="false" maxLength="500" validateData="false"/>
<Column name="Col2" ordinal="2" dataType="Text" isMandatory="false" maxLength="500" validateData="false"/>
<Column name="Col3" ordinal="3" dataType="Text" isMandatory="false" maxLength="500" validateData="false"/>
</Schema>
</ExcelDataSource>
<CinchyTableTarget model="" domain="Test" table="ExcelTable" suppressDuplicateErrors="true" >
<PostSyncScripts>
<PostSyncScript name="TestPost" timeout="200">
<CQL>Update [Test].[ExcelTable] SET [Col3]='It worked' where [Deleted] is null</CQL>
</PostSyncScript>
</PostSyncScripts>
<ColumnMappings>
<ColumnMapping sourceColumn="Col1" targetColumn="Col1" />
<ColumnMapping sourceColumn="Col2" targetColumn="Col2" />
<ColumnMapping sourceColumn="Col3" targetColumn="Col3" />
</ColumnMappings>
<SyncKey>
<SyncKeyColumnReference name="Col1" />
</SyncKey>
<NewRecordBehaviour type="INSERT" />
<ChangedRecordBehaviour type="UPDATE" />
<DroppedRecordBehaviour type="DELETE"/>
</CinchyTableTarget>
</BatchDataSyncConfig>