hr_prod
with employee dataTerraform resource | bytebase_setting |
Sample file | 8-1-semantic-types.tf |
8-1-semantic-types.tf
to define masking algorithms:
Terraform resource | bytebase_setting |
Sample file | 8-2-classification.tf |
8-2-classification.tf
to organize data by sensitivity levels:
Terraform resource | bytebase_policy |
Sample file | 8-3-global-data-masking.tf |
8-3-global-data-masking.tf
to apply workspace-wide masking rules:
dev1@example.com
), then go to SQL Editor to access hr_prod
. Double-click employee
table on the left. birth_date
has Mask Birth Date Year
semantic type, and last_name
has Last Name Only Show First Letter
. Hovering the eye icon will show the masking reason.
Terraform resource | bytebase_database |
Sample file | 8-4-database-masking.tf |
8-4-database-masking.tf
to apply masking to specific columns:
from_date
is assigned the semantic type date-year-mask
amount
is assigned the classification 2-1
(Employment info)salary
table, click it. You should see:
amount
is assigned as Employment info
(Level 2) classificationfrom_date
is assigned as date-year-mask
semantic typedev1@example.com
), then go to SQL Editor to access hr_prod
. Double-click salary
table on the left. from_date
has Date year mask
semantic type, and amount
has L2
classification which leads to Full masking
semantic type.
Terraform resource | bytebase_policy |
Sample file | 8-5-masking-exception.tf |
8-5-masking-exception.tf
to grant bypass permissions:
admin@example.com
) has Masking Exemptions for birth_date
in table employee
for Queryadmin@example.com
) has Masking Exemptions for last_name
in table employee
for Export2027-07-30T16:11:49Z
is an ISO 8601 UTC timestamp.
Our system uses PostgreSQL to store metadata, where this value is stored as a timestamptz
.admin@example.com
), then go to SQL Editor to access hr_prod
, double-click employee
table on the left. You may notice the birth_date
is not masked any longer.
birth_date
is still masked while last_name
is no longer masked.