Skip to main content

SQL Scripting Tool

The SQL Script tool can be accessed from the schema map window and can be used to write the script for a SQL, MYSQL or PostgreSQL table from your schema map configuration. You can run the script in the database connection you are connected to or copy the script and use it in your preferred database management tool.

SQL Script Tool Overview

You can find more detail on using this tool in our how to guide.

Open the Tool

To use this tool configure your schema map with the columns and data types needed and click onto the SQL button.

Open SQL Script Tool

This opens a window that prompts you to connect to your database and define a table name.

Start by entering a name for the table in the Table Name field and then use the the Database Connection field to select from your saved database connections. Select the one you need and the database type will be automatically entered.

Click OK to continue.

SQl Script - Create

From here you can edit the configuration, changing column names, data types and lengths, and change the column order if you need to. Then make sure the script language is set to the one you need and just click Script Create Table.

Create SQL Script

The script is then displayed below the configuration window and can be edited as you need.

Script Generated

You can add additional script as needed or run just a selection of your choice. To run a selection, simply highlight the script to run and click F5.

Alternatively to create the table within the database you are connected to, click onto the Execute Query button to run the create query that was generated by Data Sync.

Execute Query

The new table will now be available to use within your Data Sync projects from the connection library after refreshing the window. Just connect the project to your target dataset, map the columns, compare and sync.

After this you can add additional statements, for example a simple SELECT statement to preview any data contained in the table. Or use the SQL Query Tool to make edits to the table.