Data classification and grading SKILL
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, anddata 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.
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 thetable catalog(the database or schema for adata source table, the project's English name for aphysical table, or the business area's English name for alogical table), table name, andfieldname. -
Before you tag a
field, ensure that the targetdata categoryalready exists and is bound to the correspondingdata grading. If thedata categoryordata gradingdoes 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 categoryand bind it to the C4data grading. -
Tag the
id_cardfieldof this table as C4. -
Check the current classification and grading tags for this
field. -
Disable the security identification tags for these
fields.
Interaction steps:
-
After you issue a
data classification and gradingcommand, thecode agentfirst confirms the type of object to operate on: adata grading, adata category, or afield-level security identification result. -
The
code agenttypically queries whether thefieldalready has a tag to prevent duplicate tagging or accidental overwrites. -
For write operations such as create, update, delete, enable, or disable, the
code agentpresents the changes (including theoverwrite policy) and requires your confirmation before execution. -
After the operation is complete, the
code agenttypically reads back the corresponding object to confirm that thedata grading,data category, orfieldtag has taken effect as expected.
Execution results
After the operation completes, you receive the following results:
-
Return content: Creating or updating a
data gradingordata categoryreturns the object details. Tagging afieldreturns the identification result. Queries return thefield'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 associateddata category, so you should check them independently.
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 |
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 |
National ID Number |
|
bound grading name |
Conditional |
Provide when you create or update a |
C4-Top Secret |
|
table catalog |
Conditional |
Provide when tagging a |
my_project |
|
table and field name |
Conditional |
Provide when you tag a |
ods_user, id_card |
|
category ID |
Conditional |
Provide when you tag a |
— |
|
overwrite policy |
Conditional |
The method for handling existing tags when tagging a |
COVER_UNLOCKED |
|
identification result IDs |
Conditional |
Provide when you bulk enable, disable, or delete |
— |