Data classification and grading SKILL

Updated at:

You can use natural language commands with code agents like Qoder and CodeX to manage data grading, data category directory, data category, and field-level security identification results in Dataphin. This document describes the SKILL's features, prerequisites, usage examples, and execution results. An appendix lists the input parameters.

Introduction

The Data Classification and Grading SKILL lets you use natural language to build and maintain a data security classification and grading framework in Dataphin. This helps you identify, tag, and assign a security level to sensitive fields. This SKILL operates on three core objects: data grading defines the sensitivity level (for example, C1 to C4 or L1 to L4); a data category describes the business type (such as National ID number, phone number, or name) and is bound to a specific data grading; and a field-level security identification result links a table field to a data category, creating a field tag. These results inform subsequent data masking, permission approval, asset catalog display, and security audits.

Use cases:

  • Add or modify data grading, data category directory, and data category.

  • Tag fields such as phone numbers, National ID numbers, names, and salaries with the corresponding category and grading tags.

  • Query the current classification and grading tags for a specific field.

  • Bulk enable, disable, or delete field-level security identification results.

Note

Data grading, data category, and field-level security identification result are three distinct types of objects. Tagging a field requires creating a field-level security identification result; simply creating a data grading or data category does not automatically tag the field. When you overwrite existing tags in bulk, you must confirm the overwrite policy. The recommended default is to overwrite only unlocked tags, as overwriting all online tags carries a higher risk. For write operations such as create, update, delete, enable, or disable, the code agent typically asks for your confirmation before execution. A successful operation does not mean data masking or permission approval takes effect immediately. The actual linkage depends on data masking rules, approval rules, scan tasks, and cache synchronization.

Prerequisites

  • You have the required permissions for data security management in Dataphin.

  • You have identified the target fields for tagging, including the table catalog (the database or schema for a data source table, the project's English name for a physical table, or the business area's English name for a logical table), table name, and field name.

  • Before you tag a field, ensure that the target data category already exists and is bound to the corresponding data grading. If the data category or data grading does not exist, you must create it first.

Usage examples

You can describe your requirements to the code agent in natural language. Here are example commands you can use directly:

  • Create a new C4-Top Secret data grading.

  • Create a National ID number data category and bind it to the C4 data grading.

  • Tag the id_card field of this table as C4.

  • Check the current classification and grading tags for this field.

  • Disable the security identification tags for these fields.

Interaction steps:

  1. After you issue a data classification and grading command, the code agent first confirms the type of object to operate on: a data grading, a data category, or a field-level security identification result.

  2. The code agent typically queries whether the field already has a tag to prevent duplicate tagging or accidental overwrites.

  3. For write operations such as create, update, delete, enable, or disable, the code agent presents the changes (including the overwrite policy) and requires your confirmation before execution.

  4. After the operation is complete, the code agent typically reads back the corresponding object to confirm that the data grading, data category, or field tag has taken effect as expected.

Execution results

After the operation completes, you receive the following results:

  • Return content: Creating or updating a data grading or data category returns the object details. Tagging a field returns the identification result. Queries return the field's category name, grading name, grading order, and tag status.

  • Completion status: A successful response indicates the request has been accepted.

  • Verification: Verify the changes by reading back the lists of data gradings, data categorys, and identification results. Note that the status of an identification result is a separate dimension from the status of its associated data category, so you should check them independently.

Note

A successful response only indicates the request was accepted. For final verification, always refer to the data grading, data category, and field tags displayed in the Dataphin UI.

Appendix: Input parameters

The following table lists parameters for managing data classification and grading. This list is for reference only. In practice, the code agent automatically identifies the required information based on your command and prompts you if any information is missing. You do not need to provide parameters marked as not required, as the system generates them automatically.

Parameter

Required

Description

Example

tenant ID

Yes

The ID of the target Dataphin tenant, which is a 19-digit number.

1234567890123456789

grading name

Conditional

Provide when you create, update, or delete a data grading. It represents the sensitivity level.

C4-Top Secret

grading order

No

The sequence number for the sensitivity level. A higher value typically indicates higher sensitivity. If not specified, the system assigns one.

4

category name

Conditional

Provide when you create, update, or delete a data category. It represents the business type.

National ID Number

bound grading name

Conditional

Provide when you create or update a data category to specify the data grading it is bound to.

C4-Top Secret

table catalog

Conditional

Provide when tagging a field. It refers to the database or schema for a data source table, the project's English name for a physical table, or the business area's English name for a logical table.

my_project

table and field name

Conditional

Provide when you tag a field to specify the target table and field.

ods_user, id_card

category ID

Conditional

Provide when you tag a field to specify the data category to bind to. The code agent can retrieve this by reading the data category details.

—

overwrite policy

Conditional

The method for handling existing tags when tagging a field. Options are to overwrite only unlocked tags or to overwrite all online tags.

COVER_UNLOCKED

identification result IDs

Conditional

Provide when you bulk enable, disable, or delete field tags.

—