Skip to main content

Inspect Data Meaning

Type: Function

Retrieve column-level governance information for a table. Returns data type classifications, sensitivity levels, PII flags, masking configurations, and applied policies for each column. Optionally filter to specific columns.

Use CasesDirect link to Use Cases

  • An AI agent checks which columns contain PII before constructing a SELECT statement
  • A security review audits masking rules applied to sensitive columns
  • An agent determines which columns it can safely include in an output dataset
  • A data engineer verifies that classification and masking are correctly configured after a policy deployment

Input ParametersDirect link to Input Parameters

ParameterTypeRequiredDescription
table_namestringYesFully qualified table name (DB.SCHEMA.TABLE).
columnsarrayNoArray of column name strings to inspect. If omitted, all governed columns in the table are returned.

Output SchemaDirect link to Output Schema

Returns an array of column objects:

FieldTypeDescription
column_namestringName of the column
data_typeobjectSemantic data type classification
data_type.idstringMachine-readable type identifier (e.g., email_address, phone_number, full_name)
data_type.labelstringHuman-readable label (e.g., "Email Address", "Phone Number")
sensitivitystringColumn sensitivity: public, internal, confidential, or restricted
is_piibooleanWhether this column is classified as personally identifiable information
maskingobjectMasking configuration
masking.enabledbooleanWhether masking is active on this column
masking.typestringMasking type: hash, redact, partial, null, or none
masking.configobjectAdditional masking parameters (e.g., {"visible_chars": 4} for partial masking)
masking.exempt_rolesarrayRoles that bypass masking (e.g., ["DATA_ADMIN"])
policyobjectPolicy that governs this column
policy.idstringPolicy identifier
policy.namestringHuman-readable policy name

Example ResponseDirect link to Example Response

{
"status": "success",
"data": [
{
"column_name": "EMAIL",
"data_type": {
"id": "email_address",
"label": "Email Address"
},
"sensitivity": "confidential",
"is_pii": true,
"masking": {
"enabled": true,
"type": "partial",
"config": {
"visible_chars": 4,
"mask_char": "*",
"preserve_domain": true
},
"exempt_roles": ["DATA_ADMIN", "COMPLIANCE_OFFICER"]
},
"policy": {
"id": "pol_customer_pii_001",
"name": "Customer PII Protection"
}
},
{
"column_name": "ACCOUNT_STATUS",
"data_type": {
"id": "categorical",
"label": "Categorical"
},
"sensitivity": "internal",
"is_pii": false,
"masking": {
"enabled": false,
"type": "none",
"config": {},
"exempt_roles": []
},
"policy": {
"id": "pol_customer_pii_001",
"name": "Customer PII Protection"
}
}
],
"errors": []
}

SQL ExamplesDirect link to SQL Examples

Inspect all columns in a tableDirect link to Inspect all columns in a table

SELECT METATATE_APP.CORE.INSPECT_COLUMNS(
OBJECT_CONSTRUCT('table_name', 'ANALYTICS_DB.CORE.CUSTOMERS')
);

Inspect specific columnsDirect link to Inspect specific columns

SELECT METATATE_APP.CORE.INSPECT_COLUMNS(
OBJECT_CONSTRUCT(
'table_name', 'ANALYTICS_DB.CORE.CUSTOMERS',
'columns', ARRAY_CONSTRUCT('EMAIL', 'PHONE', 'SSN')
)
);

Extract PII columns onlyDirect link to Extract PII columns only

SELECT col.value:column_name::STRING AS column_name,
col.value:sensitivity::STRING AS sensitivity,
col.value:masking:type::STRING AS masking_type
FROM TABLE(FLATTEN(
METATATE_APP.CORE.INSPECT_COLUMNS(
OBJECT_CONSTRUCT('table_name', 'ANALYTICS_DB.CORE.CUSTOMERS')
):data
)) col
WHERE col.value:is_pii = TRUE;

JSON Request / Response (API)Direct link to JSON Request / Response (API)

Request:

{
"method": "tools/call",
"params": {
"name": "inspect-data-meaning",
"arguments": {
"table_name": "ANALYTICS_DB.CORE.CUSTOMERS",
"columns": ["EMAIL", "PHONE"]
}
}
}

Response:

{
"content": [
{
"type": "text",
"text": "{\"status\":\"success\",\"data\":[{\"column_name\":\"EMAIL\",\"data_type\":{\"id\":\"email_address\",\"label\":\"Email Address\"},\"sensitivity\":\"confidential\",\"is_pii\":true,\"masking\":{\"enabled\":true,\"type\":\"partial\",\"config\":{\"visible_chars\":4,\"mask_char\":\"*\",\"preserve_domain\":true},\"exempt_roles\":[\"DATA_ADMIN\"]},\"policy\":{\"id\":\"pol_customer_pii_001\",\"name\":\"Customer PII Protection\"}},{\"column_name\":\"PHONE\",\"data_type\":{\"id\":\"phone_number\",\"label\":\"Phone Number\"},\"sensitivity\":\"confidential\",\"is_pii\":true,\"masking\":{\"enabled\":true,\"type\":\"redact\",\"config\":{},\"exempt_roles\":[\"DATA_ADMIN\"]},\"policy\":{\"id\":\"pol_customer_pii_001\",\"name\":\"Customer PII Protection\"}}],\"errors\":[]}"
}
]
}
Try it in the app

Open Metatate and navigate to the Test Tools tab to run inspect-data-meaning interactively. Enter a table name and optionally select specific columns to inspect.