Add a data table

更新时间:
复制 MD 格式

Data tables contain the raw data for a project. After data validation and authorization, these tables can be used as offline samples in the project console. After you create a table schema template, you can add a data table based on that template. This topic describes how to add a data table in the management console.

Prerequisites

Before you start, complete the following tasks:

  1. Install and deploy nodes, and grant permissions between them. For more information, see Privacy-preserving computation nodes.

    This node stores the target data table. Select the engine type for the node based on the following conditions:

    • The engine type depends on the type of project the node participates in. For more information about the relationship between project types and node engine types, see Engines.

    • The engine of the node that stores the target data table must be a federated learning, training, or security analytics engine. It cannot be a prediction engine.

  2. Create a table schema template in the management console. For more information, see Create a table schema template.

  3. Upload the target data table to the server of the target node. The target node is the one you installed, deployed, and authorized in the first prerequisite.

    Note

    If you upload a CSV file, the first row of the file must be the table header, which contains the column names. You can upload the following two sample CSV files to the ~/nueva/agent/data/dataset/sample/data folder on the training node server. You can then add them as data tables.

Procedure

  1. Log on to the Ant Privacy-Preserving Computation Platform.

  2. In the navigation pane on the left, choose My Resources > Data Assets.

  3. On the Data Tables tab, click Add Data Table to the right of the target table schema template.

  4. In the Create Data Table panel, select the file type for the target data table.

    The file type depends on the type of project the data table is used for. The following list describes the required file types for different projects:

    • CSV file data table: Used for federated modeling, multi-party secure modeling, and private set intersection projects.

    • MySQL data table: Used for multi-party security analytics projects.

  5. Enter the required information based on the file type you selected.

    • The data table is of type CSV File Data Table.

      1. Enter the following information for the CSV file data table.

        Parameter

        Description

        Associated Node

        Select the node where the target data table resides. This is the node that you installed, deployed, and authorized in Step 1 of the Prerequisites section.

        Data Address

        The storage address of the data table file. Enter the relative path to the ~/nueva/agent/data/dataset folder on the node. The path must start with ./. For example, ./data/example.csv.

        Data Table Name

        A custom name for the data table. The name must meet the following requirements:

        • Start with a letter. It can contain letters, digits, underscores (_), and hyphens (-).

        • Be no more than 64 characters in length.

        Description

        Optional. A description of the data table.

      2. Click Validate Data Schema to validate the data structure.

        The validation is successful if the following conditions are met:

        • The data file exists at the specified data address.

        • The table schema of the data file matches the current table schema template.

      3. After the validation is successful, click OK.

      4. On the Data Tables tab, click the 2 icon to the left of the target table schema template. In the drop-down list, verify that the status of the new data table is Active.

        Note

        If the status of the new data table is Inactive, the data connection has failed. Perform the following steps:

        1. Click the name of the target data table. On the Data Table Details page, click Edit to open the Edit Data Table page.

        2. Click Validate Data Schema to view the error message. Compare the Node, Data Address, and Data Table Name parameters with your local data, and then correct the data information on the node.

        3. After you correct the local data on the node, click Validate Data Schema on the Edit Data Table page. Verify that the system returns a Validation successful message.

    • The data table is a MySQL data table

      1. Enter the following information for the MySQL data table.

        Parameter

        Description

        Associated Node

        Select the node where the target data table resides. This is the node that you installed, deployed, and authorized in Step 1 of the Prerequisites section.

        Physical Database Name

        The name of the Database in the target node that stores the MySQL data table.

        Physical Data Table Name

        The actual name of the MySQL data table in the MySQL database.

        Description

        Optional. A description of the data table.

      2. After you complete the configuration, click OK.