Update a SQL Table

The following page will cover how to create your first project, updating an existing SQL Table with data from a CSV file.

Update Existing SQL Table

To update an existing SQL table open a new Data Sync project and connect to the Update Customer Data CSV File.

Connect to the CSV

Open Data Sync and connect to the Update Customer Data CSV file. You can do this by either drag and dropping the file from your file explorer:

Drag and Drop CSV

Or by going to Connect Data Source > Text Files > CSV File and then locate your file under File Name.

Connect CSV

Connect to a SQL Table

Connect to your SQL server by going to Connect Data Source > SQL Database > Microsoft SQL Server choose the correct server from the drop down and enter in the required credentials.

Connect SQL Server

Click Connect & Create Library Connection to save this to your connection library. Type in a name for your connection and then click OK.

Name the Connection

A new window will now open where you can select your SQL table from the list. You also have the option to enter a SQL query to select the data you wish to work with.

NB: If you specify a SQL query the data source will be read-only as Data Sync cannot work out how to update the data source from a user defined query.

Select Table

You are now connected to your SQL Table.

NB. If you have already saved your connection to the connection library expand the SQL connection and choose your table from the list either by drag and dropping onto the target or right clicking and choosing Connect to Target (B).

Right Click Table

Mapping

Add and remove columns from the schema as you wish and ensure that you select a key column. This must be unique but can be a combination of columns if a single unique column is not available.

Please also check that the data types are correct, changing these where required.

Mapping

Compare & Synchronise

Once the schema map has been configured click Compare A -> B to view the results (what will be synchronised to your SQL table.) We can see that we have deletion, additions and updates available. By default the deletions are disabled, we also do not want to delete the data as we are updating the target (B) with the data from the source (A).

Compare Results

Compare Results - Updates

Once you are happy click Synchronise and then Start to begin the synchronisation.

Sync Button

Start Sync

To check that your sync was successful run the comparison again, we should now see only the deletion results being returned.

No Results