Applies to
ApexSQL Data Diff and ApexSQL Data Diff for MySQL
Summary
This article explains how to use the Object mapping feature in ApexSQL Data Diff and ApexSQL Data Diff for MySQLto map the specific objects in a database for comparison and synchronization in SQL or MySQL Server.
Description
Object mapping is used for a custom mapping of tables and indexed views with different names and schemas. By default, only tables are set as an object for comparison. To include both, tables and views as objects for comparison, in the Options tab, check the Tables and views option:
|
Quick tip: Tables and indexed views with the same names and schemas are automatically mapped |
To open the Object mapping window, in the New project window, set the data sources (source and destination database), expand the Advanced options, and select the Object mapping tab:
|
Quick tip: The automatic mapping can’t be done for the objects that exist only in the source, or only in the destination data source |
ApexSQL Data Diff and ApexSQL Data Diff for MySQL will load and automatically map all objects with the same object and schema name:
To change the lists of all automatically mapped tables or views, click on an appropriate tab:
Custom table mapping
There are two cases for performing the custom table mapping:
-
To exclude automatically mapped tables or views from the comparison select objects in the list and click the Unmap button:
Quick tip:
Press and hold CTRL to select multiple tables and unmap them at the same time
The unmapped tables will appear in the unmapped records list:
Furthermore, the user can unmap more tables and then map them as wanted:
-
To compare and synchronize differently named SQL or MySQL Server tables/views with the same schema names, select the tables/views from the unmapped record list, and click on the Map button:
The mapped tables will be presented in the mapped object list and included in comparison:
Quick tip:
To remove all custom defined object mapping, click the Default button
Custom column mapping
Custom column mapping can be performed by selecting the Mapped columns cell for the particular object, and clicking the ellipse (…) button:
There are two cases for performing the custom column mapping:
-
To exclude automatically mapped columns from the comparison select the columns in the list and click the Unmap button:
The unmapped columns will appear in the unmapped column list:
Quick tip:
Unmapping the unneeded columns from the comparison and synchronization can speed up the process
Furthermore, the user can unmap more columns and then map them as wanted:
-
If differently named tables are custom mapped and contain differently named columns the Mapped columns cell will not show any mapped columns:
To map columns with different names open the Object mapping dialog, select the columns and click the Map button:
Quick tip:
If the column names are the same in differently named tables, by mapping tables the columns will be automatically mapped