Purpose
This view displays all columns protected by sensitive rules in all tenants.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| TENANT_ID | int(20) | NO | The tenant ID. |
| RULE_NAME | varchar(256) | NO | The name of the sensitive rule. |
| DATABASE_NAME | varchar(128) | NO | The name of the database. |
| TABLE_NAME | varchar(128) | NO | The name of the table. |
| COLUMN_NAME | varchar(128) | NO | The name of the column. |
Sample query
Query all columns protected by sensitive rules in all tenants.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_SENSITIVE_COLUMNS;
The query result is as follows:
+-----------+-----------+---------------+------------+-------------+
| TENANT_ID | RULE_NAME | DATABASE_NAME | TABLE_NAME | COLUMN_NAME |
+-----------+-----------+---------------+------------+-------------+
| 1 | r1 | test | t2 | c |
| 1 | r1 | test | t1 | a |
+-----------+-----------+---------------+------------+-------------+
2 row in set