Skip to main content

Export Salesforce Data to a New SQL Table

Data Sync makes it very quick and easy to export data from Salesforce into a new SQL Table.

The guide below covers how to use Data Sync to create a new SQL Table and export the account data from Salesforce. Although this guide connects to the account object you can connect to any of the available objects within Salesforce and export the data as needed.

Connect to Salesforce

To get started connect to the Salesforce object you want to export data from. This guide assumes you have already created a connection to Salesforce and saved it to the connection library. If you have not already done this please see our Salesforce Connection Documentation to learn how to connect.

From the connection library window you can expand the tree and either drag and drop the object you wish to connect to into the source or the target windows, or you can right click and choose either Connect to Source or Connect to Target.

In this guide we need Salesforce as our source so we select Connect to Source (A)

Connection Library

Add the columns to the Schema

Now add the columns you want to export to the schema map and make sure to select a key column. Usually this is an ID column that can be used to identify each record.

Schema Map

Your new SQL table is going to use the schema map of the source columns as the template, so the column names will match the names from Salesforce.

Create the SQL Table

Data Sync has a built in feature to create a new SQL Table based off the source columns added to the schema map.

To create the SQL Table open the Tools menu and select Create SQL Table. Then follow through the wizard to connect to your database and enter in a name for the table.

Tools Menu

This will create a new table with the same columns from the source that were present in the schema map when it was created. This will load the new empty SQL table into the target window and the columns should map automatically into the schema map.

Compare & Sync

Once you have checked your schema configuration and ensured a key column has been selected, click the Run Compare button in the toolbar. This will open the compare results where you can preview the changes to be made.

Compare Results

To finish click Synchronise and then Start to begin the sync. Your Salesforce data has now been added to the CSV file.