Export and import data models

更新时间:
复制 MD 格式

After you create data models, BizWorks lets you export them as JSON documents. You can also import models exported from BizWorks. You can use this feature to migrate data models between different systems. This topic describes how to export and import data models.

Export model files

  1. Log in to BizWorks, in the select Platform drop-down list selected modeling Platform.

  2. Click the a7.pngicon or the text box in the upper-right corner of the page. From the drop-down list, click the name of the project that you want to view and click the Modeling tab. In the Modeling navigation bar, choose Technical Modeling > Bounding Context.

  3. On the Bounding Context page, click the name of the bounding context.

  4. In the navigation pane of the destination bounded context, click Data Model. On the Data Model page, choose More > Export Model File. The system immediately downloads the data model as a JSON file.

Import model files

  1. On the Data Model page, choose More > Import Model File.

  2. In the Import Model File panel, click the dashed-line box to upload a file or drag a file into the box, and then click Import. Only JSON files no larger than 5 MB are supported.

    Important

    If the model file contains existing resources, the import process will fail.

Import models from a database

To synchronize a database table structure with BizWorks, use the data model import feature.

  1. On the Data Model page, choose More > Import Models from Database.

  2. On the Configure Database Parameters step of the Import Data Models from Database panel, configure the parameters and click Next.

    1. Configure Database Parameters.

      • From the Select Database Connection drop-down list, select the destination database connection.

        If the drop-down list is empty or you want to add a database connection, click Manage Database Connections.

        In the Manage Databases panel, click Add Database Connection. After you configure parameters such as Database Connection Name, Database Type, and Server, click Save, and then click Close.

      • Enter the Username and Password.

    2. Configure the Import Rule: If a model with the same table name already exists, you can select Skip Import, Overwrite Import, or Terminate Import.

      If models have different model codes but the same table name:

      • If you select Skip Import: The table with the duplicate name is not imported. Other tables are imported normally.

      • If you select Overwrite Import: The existing model data with the same table name is overwritten. All fields and indexes are completely replaced with data from the database. This process is not an incremental import.

      • If you select Terminate Import: The entire import process is aborted, and no tables are imported.

      Note
      • The system automatically generates a model code for each table, which you can also modify manually in the next step.

      • Regardless of whether the table names are the same, the model code must be unique within the system.

  3. On the Select Data Tables step, select the destination data tables (you can select more than one), edit the Model Code as required, and click Next.

    Note

    The Model Code must be unique within the data model, start with a lowercase letter, contain only letters and digits, and have a maximum length of 80 characters.

    • If the data model is imported successfully, you will see a message: Import successful. **** data models were imported this time.

    • If the data model fails to import, you will see the Import failed message, and the system will list the specific details of the failure and the corresponding error messages.