All Products
Search
Document Center

DataWorks:Identify data using a custom model

Last Updated:Jun 20, 2026

DataWorks enables model training using the sample fields you provide. This process helps identify content patterns in target fields and generates a rule model, which you can use to discover data with similar patterns within your data assets. This topic explains how to create a custom data identification model.

Limitations

  • DataWorks does not support model training on sample fields with fewer than 10 rows of data, or on data shorter than 4 or longer than 40 characters. The minimum sample size is 10 rows and the maximum is 10,000 rows. If the total number of rows in the selected fields exceeds 10,000, the system randomly selects 10,000 rows for model training. If the total number is less than 10,000, all available rows are used for model training.

  • DataWorks currently supports model training only for data that contains numbers, English letters, and special characters. Model training is not supported for sample fields that contain Chinese characters, including Chinese punctuation.

Create a model

  1. Go to Data Security Guard.

    1. Log on to the DataWorks console. In the target region, click Data Governance > Security Center in the left-side navigation pane. On the page that appears, click Go to Security Center.

    2. In the left-side navigation pane, click Data Security > Sensitive Data Management and then click Try Now to access Data Security Guard.

      Note
      • If your Alibaba Cloud account is already authorized, you are directed to the Data Security Guard homepage.

      • If your Alibaba Cloud account is not authorized, you are redirected to the Data Security Guard authorization page. To use Data Security Guard features for the first time, go to Data Security > Sensitive Data Management, select Data Security Guard in the pop-up dialog, and then complete the authorization.

  2. In the left-side navigation pane, click Rule Setting > Sensitive Data Identification to go to the Sensitive data identification page.

  3. Create a model and start model training.

    1. On the Self-generated data identification models tab, click Create Model.

    2. In the Create Model dialog box, configure the Model Name and select training samples.

      • Positive sample field: You can select one or more sample fields from a specific workspace for model training. DataWorks uses these fields to identify content patterns and generate a corresponding rule model. You can then use this model to discover data with similar content patterns within your data assets.

        Note

        DataWorks does not support model training on sample fields with fewer than 10 rows of data, or on data shorter than 4 or longer than 40 characters. The minimum sample size is 10 rows and the maximum is 10,000 rows. If the total number of rows in the selected fields exceeds 10,000, the system randomly selects 10,000 rows for model training. If the total number is less than 10,000, all available rows are used for model training.

        DataWorks currently supports model training only for data that contains numbers, English letters, and special characters. Model training is not supported for sample fields that contain Chinese characters, including Chinese punctuation.

      • Negative sample field: To improve model accuracy, you can select negative sample fields. The system uses the data content of the selected negative sample fields as negative samples for training. If you do not select a negative sample field, the system generates negative samples based on the patterns and volume of the positive samples to complete model training.

    3. Click Next Step.

    4. Select I accept that Data Security Guard will use samples for model training, and then click Start Training.

      The system randomly extracts up to 100 rows of data from each sample field you selected. The estimated time required is calculated based on the number of sample fields.

      Note

      Model training can take a long time. You can close the training dialog box and perform other operations while the training runs in the background.

  4. View the model training results.

    On the Self-generated data identification models page, you can view the training status and results of the target model. The results help you determine if the model is ready for deployment and data identification.

    • View the training status.

      • Remaining hh:mm:ss: The model is training.

      • Training Completed: The model has finished training.

      • Draft: The model is created but not yet trained and cannot be used for data identification.

    • View the training results.

      For a model with a Training Completed status, click the 编辑模型 icon in the Actions column to view how accurately the model's extracted features identify the sample data. We recommend that you deploy the model only when its accuracy reaches 100%.

      Note

      For best results, add more sample data and retrain the model until its accuracy is 100% before deployment.

      The evaluation page is divided into Positive sample and Negative sample sections, which show the hit rate, total samples, hits, and misses. The Identification details section displays the identification results (match or no match) for 10 random sample rows. You can click Refresh to view other random samples.

  5. Click Create to finish creating the rule model.

Next steps

After the rule model is created, go to the Data identification rules page to deploy the model for data identification. For more information about using a custom model on the Data identification rules page, see Configure a data identification rule and run an identification task.