

 Amazon Redshift will no longer support the creation of new Python UDFs starting Patch 198. Existing Python UDFs will continue to function until June 30, 2026. For more information, see the [ blog post ](https://aws.amazon.com/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/). 

# SYS\$1APPLIED\$1MASKING\$1POLICY\$1LOG
<a name="SYS_APPLIED_MASKING_POLICY_LOG"></a>

Use SYS\$1APPLIED\$1MASKING\$1POLICY\$1LOG to trace the application of dynamic data masking policies on queries that reference DDM-protected relations.

SYS\$1APPLIED\$1MASKING\$1POLICY\$1LOG is visible to the following users:
+  Superusers 
+  Users with the `sys:operator` role 
+  Users with the ACCESS SYSTEM TABLE permission 

Regular users will see 0 rows.

Note that SYS\$1APPLIED\$1MASKING\$1POLICY\$1LOG isn’t visible to users with the `sys:secadmin` role.

For more information on dynamic data masking, go to [Dynamic data masking](t_ddm.md).

## Table columns
<a name="SYS_APPLIED_MASKING_POLICY_LOG-table-rows"></a>

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/redshift/latest/dg/SYS_APPLIED_MASKING_POLICY_LOG.html)

## Sample queries
<a name="SYS_APPLIED_MASKING_POLICY_LOG-sample-queries"></a>

The following example shows that the `mask_credit_card_full` masking policy is attached to the `credit_db.public.credit_cards` table.

```
select policy_name, database_name, relation_name, schema_name, relation_kind 
from sys_applied_masking_policy_log;

policy_name           | database_name | relation_name | schema_name | relation_kind
----------------------+---------------+---------------+-------------+---------------
mask_credit_card_full | credit_db     | credit_cards  | public      | table

(1 row)
```