Importing and Exporting Table Definitions
This section describes the steps to import and export table definitions in JSON format.
Table definitions are stored in the repository database and include the following information about tables: table name in a channel, basename (table name in a source/target database), table group, number of columns, column names, column data type and column length, information about primary keys, unique keys, and check constraints, etc.
Importing Table Definitions
You can load one or more tables to a channel by importing the table definitions from a JSON file. Table definitions can be imported on the Tables page.
To import a table definition:
Navigate to the left side bar and click TABLES.
On the Tables page, click the More Options icon at the top right and select Import Table Definitions.
Browse for the table definition file, select it, and click Open.
The Import Summary dialog will show the details of the import.
Click Continue. The tables will be added to the table list.
Two tables with identical names are not allowed in a channel. Therefore, when trying to import a table with the name that already exists in a channel, the Import Summary dialog will ask you how to proceed:
- Rename - adds another table with a name formed by adding an incremental number to the name of the existing table. For example, if you import table customer that already exists in a channel, it will be added with the name customer2, whereas the customer table will remain in the channel.
- Replace - replaces the existing table definition with the definition of the imported table.
Exporting Table Definitions
You can export table definitions from the Tables and Table Details page. Table definition(s) will be exported to a JSON file.
Exporting Table Definitions From Tables Page
To export a table definition:
Navigate to the left side bar and click TABLES.
On the Tables page, select the table(s) to be exported. To display only tables of a specific channel, select the channel in the Channels selector.
Click the More Options icon at the top-right and select Export Table Definitions.
In the Export Tables dialog, choose the scope of data to be exported and click Export.
Choose the directory to save the file to and click Save.
Exporting Table Definitions From Table Details Page
To export a table definition:
Navigate to the left side bar and click TABLES.
On the Tables page, click the required table name. To display only tables of a specific channel, select the channel in the Channels selector.
On the Table Details page, click the More Options icon at the top right of the Columns tab and select Export Table Definition.
In the Export Tables dialog, choose the scope of data to be exported and click Export.
Choose the directory to save the file to and click Save.