

 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/). 

# Secure logging
<a name="db-auditing-secure-logging"></a>

When Amazon Redshift logs a query that references one or more AWS Glue Data Catalog views, Amazon Redshift automatically masks fields in certain system table and view columns when logging metadata about that query.

Secure log masking applies to all system table and view entries that Amazon Redshift generates while running a query that fits the masking conditions. The following table lists system views and columns that have secure logging applied, masking text with `******` and numbers with `-1`. The number of asterisks used to mask text matches the number of characters in the original text, up to 6 characters. Strings longer than 6 characters still appear as 6 asterisks.


****  

| System table | Sensitive columns | 
| --- | --- | 
| [SYS\$1EXTERNAL\$1QUERY\$1DETAIL](https://docs.aws.amazon.com/redshift/latest/dg/SYS_EXTERNAL_QUERY_DETAIL.html) | **Columns:** source\$1type, total\$1partitions, qualified\$1partitions, scanned\$1files, returned\$1rows, returned\$1bytes, file\$1format, file\$1location, external\$1query\$1text, warning\$1message. | 
| [SYS\$1EXTERNAL\$1QUERY\$1ERROR](https://docs.aws.amazon.com/redshift/latest/dg/SYS_EXTERNAL_QUERY_ERROR.html) | **Columns:** file\$1location, rowid, column\$1name, original\$1value, modified\$1value, trigger, action, action\$1value, error\$1code. | 
| [SYS\$1QUERY\$1DETAIL](https://docs.aws.amazon.com/redshift/latest/dg/SYS_QUERY_DETAIL.html) | **Columns:** step\$1id, step\$1name, table\$1id, table\$1name, input\$1bytes, input\$1rows, output\$1bytes, output\$1rows, blocks\$1read, blocks\$1write, local\$1read\$1IO, remote\$1read\$1IO, spilled\$1block\$1local\$1disk, spilled\$1block\$1remote\$1disk, step\$1attribute. | 
| [SYS\$1QUERY\$1HISTORY](https://docs.aws.amazon.com/redshift/latest/dg/SYS_QUERY_HISTORY.html) | **Columns:** returned\$1rows, returned\$1bytes. | 
| [STL\$1AGGR](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_AGGR.html) | **Columns:** rows, bytes, tbl, type. | 
| [STL\$1BCAST](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_BCAST.html) | **Columns:** rows, bytes, packets. | 
| [STL\$1DDLTEXT](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_DDLTEXT.html) | **Columns:** label, text. | 
| [STL\$1DELETE](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_DELETE.html) | **Columns:** rows, tbl. | 
| [STL\$1DIST](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_DIST.html) | **Columns:** rows, bytes, packets. | 
| [STL\$1ERROR](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_ERROR.html) | **Columns:** file, linenum, context, error. | 
| [STL\$1EXPLAIN](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_EXPLAIN.html) | **Columns:** plannode, info. | 
| [STL\$1FILE\$1SCAN](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_FILE_SCAN.html) | **Columns:** name, line, bytes. | 
| [STL\$1HASH](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_HASH.html) | **Columns:** rows, bytes, tbl, est\$1rows. | 
| [STL\$1HASHJOIN](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_HASHJOIN.html) | **Columns:** rows, tbl, num\$1parts, join\$1type. | 
| [STL\$1INSERT](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_INSERT.html) | **Columns:** rows, tbl. | 
| [STL\$1LIMIT](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_LIMIT.html) | **Columns:** rows. | 
| [STL\$1MERGE](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_MERGE.html) | **Columns:** rows. | 
| [STL\$1MERGEJOIN](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_MERGEJOIN.html) | **Columns:** rows, tbl. | 
| [STL\$1NESTLOOP](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_NESTLOOP.html) | **Columns:** rows, tbl. | 
| [STL\$1PARSE](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_PARSE.html) | **Columns:** rows. | 
| [STL\$1PLAN\$1INFO](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_PLAN_INFO.html) | **Columns:** startupcost, totalcost, rows, bytes. | 
| [STL\$1PROJECT](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_PROJECT.html) | **Columns:** rows, tbl. | 
| [STL\$1QUERY](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_QUERY.html) | **Columns:** querytxt. | 
| [STL\$1QUERY\$1METRICS](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_QUERY_METRICS.html) | **Columns:** max\$1rows, rows, max\$1blocks\$1read, blocks\$1read, max\$1blocks\$1to\$1disk, blocks\$1to\$1disk, max\$1query\$1scan\$1size, query\$1scan\$1size. | 
| [STL\$1QUERYTEXT](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_QUERYTEXT.html) | **Columns:** text. | 
| [STL\$1RETURN](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_RETURN.html) | **Columns:** rows, bytes. | 
| [STL\$1S3CLIENT](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_S3CLIENT.html) | **Columns:** bucket, key, transfer\$1size, data\$1size. | 
| [STL\$1S3CLIENT\$1ERROR](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_S3CLIENT_ERROR.html) | **Columns:** bucket, key, error, transfer\$1size. | 
| [STL\$1SAVE](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_SAVE.html) | **Columns:** rows, bytes, tbl. | 
| [STL\$1SCAN](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_SCAN.html) | **Columns:** rows, bytes, fetches, type, tbl, rows\$1pre\$1filter, rows\$1pre\$1user\$1filter, perm\$1table\$1name, scanned\$1mega\$1value. | 
| [STL\$1SORT](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_SORT.html) | **Columns:** rows, bytes, tbl. | 
| [STL\$1SSHCLIENT\$1ERROR](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_SSHCLIENT_ERROR) | **Columns:** ssh\$1username, endpoint, command, error. | 
| [STL\$1TR\$1CONFLICT](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_TR_CONFLICT.html) | **Columns:** table\$1id. | 
| [STL\$1UNDONE](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_UNDONE.html) | **Columns:** table\$1id. | 
| [STL\$1UNIQUE](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_UNIQUE.html) | **Columns:** rows, type, bytes. | 
| [STL\$1UTILITYTEXT](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_UTILITYTEXT.html) | **Columns:** label, text. | 
| [STL\$1WINDOW](https://docs.aws.amazon.com/redshift/latest/dg/r_STL_WINDOW.html) | **Columns:** rows. | 
| [STV\$1BLOCKLIST](https://docs.aws.amazon.com/redshift/latest/dg/r_STV_BLOCKLIST.html) | **Columns:** col, tbl, num\$1values, minvalue, maxvalue. | 
| [STV\$1EXEC\$1STATE](https://docs.aws.amazon.com/redshift/latest/dg/r_STV_EXEC_STATE.html) | **Columns:** rows, bytes, label. | 
| [STV\$1INFLIGHT](https://docs.aws.amazon.com/redshift/latest/dg/r_STV_INFLIGHT.html) | **Columns:** label, text. | 
| [STV\$1LOCKS](https://docs.aws.amazon.com/redshift/latest/dg/r_STV_LOCKS.html) | **Columns:** table\$1id. | 
| [STV\$1QUERY\$1METRICS](https://docs.aws.amazon.com/redshift/latest/dg/r_STV_QUERY_METRICS.html) | **Columns:** rows, max\$1rows, blocks\$1read, max\$1blocks\$1read, max\$1blocks\$1to\$1disk, blocks\$1to\$1disk, max\$1query\$1scan\$1size, query\$1scan\$1size. | 
| [STV\$1STARTUP\$1RECOVERY\$1STATE](https://docs.aws.amazon.com/redshift/latest/dg/r_STV_STARTUP_RECOVERY_STATE.html) | **Columns:** table\$1id, table\$1name. | 
| [STV\$1TBL\$1PERM](https://docs.aws.amazon.com/redshift/latest/dg/r_STV_TBL_PERM.html) | **Columns:** id, name, rows, sorted\$1rows, temp, block\$1count, query\$1scan\$1size. | 
| [STV\$1TBL\$1TRANS](https://docs.aws.amazon.com/redshift/latest/dg/r_STV_TBL_TRANS.html) | **Columns:** id, rows, size. | 
| [SVCS\$1EXPLAIN](https://docs.aws.amazon.com/redshift/latest/dg/r_SVCS_EXPLAIN.html) | **Columns:** plannode, info. | 
| [SVCS\$1PLAN\$1INFO](https://docs.aws.amazon.com/redshift/latest/dg/r_SVCS_PLAN_INFO.html) | **Columns:** rows, bytes. | 
| [SVCS\$1QUERY\$1SUMMARY](https://docs.aws.amazon.com/redshift/latest/dg/r_SVCS_QUERY_SUMMARY.html) | **Columns:** step, rows, bytes, rate\$1row, rate\$1byte, label, rows\$1pre\$1filter. | 
| [SVCS\$1S3LIST](https://docs.aws.amazon.com/redshift/latest/dg/r_SVCS_S3LIST.html) | **Columns:** bucket, prefix, retrieved\$1files, max\$1file\$1size, avg\$1file\$1size. | 
| [SVCS\$1S3LOG](https://docs.aws.amazon.com/redshift/latest/dg/r_SVCS_S3LOG.html) | **Columns:** message. | 
| [SVCS\$1S3PARTITION\$1SUMMARY](https://docs.aws.amazon.com/redshift/latest/dg/r_SVCS_S3PARTITION_SUMMARY.html) | **Columns:** total\$1partitions, qualified\$1partitions, min\$1assigned\$1partitions, max\$1assigned\$1partitions, avg\$1assigned\$1partitions. | 
| [SVCS\$1S3QUERY\$1SUMMARY](https://docs.aws.amazon.com/redshift/latest/dg/r_SVCS_S3QUERY_SUMMARY.html) | **Columns:** external\$1table\$1name, file\$1format, s3\$1scanned\$1rows, s3\$1scanned\$1bytes, s3query\$1returned\$1rows, s3query\$1returned\$1bytes. | 
| [SVL\$1QUERY\$1METRICS](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_QUERY_METRICS.html) | **Columns:** step\$1label, scan\$1row\$1count, join\$1row\$1count, nested\$1loop\$1join\$1row\$1count, return\$1row\$1count, spectrum\$1scan\$1row\$1count, spectrum\$1scan\$1size\$1mb. | 
| [SVL\$1QUERY\$1METRICS\$1SUMMARY](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_QUERY_METRICS_SUMMARY.html) | **Columns:** step\$1label, scan\$1row\$1count, join\$1row\$1count, nested\$1loop\$1join\$1row\$1count, return\$1row\$1count, spectrum\$1scan\$1row\$1count, spectrum\$1scan\$1size\$1mb. | 
| [SVL\$1QUERY\$1REPORT](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_QUERY_REPORT.html) | **Columns:** rows, bytes, label, rows\$1pre\$1filter. | 
| [SVL\$1QUERY\$1SUMMARY](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_QUERY_SUMMARY.html) | **Columns:** rows, bytes, rows\$1pre\$1filter. | 
| [SVL\$1S3LIST](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_S3LIST.html) | **Columns:** bucket, prefix, retrieved\$1files, max\$1file\$1size, avg\$1file\$1size. | 
| [SVL\$1S3LOG](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_S3LOG.html) | **Columns:** message. | 
| [SVL\$1S3PARTITION](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_S3PARTITION.html) | **Columns:** rows, bytes, label, rows\$1pre\$1filter. | 
| [SVL\$1S3PARTITION\$1SUMMARY](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_S3PARTITION_SUMMARY.html) | **Columns:** total\$1partitions, qualified\$1partitions, min\$1assigned\$1partitions, max\$1assigned\$1partitions, avg\$1assigned\$1partitions. | 
| [SVL\$1S3QUERY](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_S3QUERY.html) | **Columns:** external\$1table\$1name, file\$1format, s3\$1scanned\$1rows, s3\$1scanned\$1bytes, s3query\$1returned\$1rows, s3query\$1returned\$1bytes, files. | 
| [SVL\$1S3QUERY\$1SUMMARY](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_S3QUERY_SUMMARY.html) | **Columns:** external\$1table\$1name, file\$1format, s3\$1scanned\$1rows, s3\$1scanned\$1bytes, s3query\$1returned\$1rows, s3query\$1returned\$1bytes. | 
| [SVL\$1S3RETRIES](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_S3RETRIES.html) | **Columns:** file\$1size, location, message. | 
| [SVL\$1SPECTRUM\$1SCAN\$1ERROR](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_SPECTRUM_SCAN_ERROR.html) | **Columns:** location, rowid, colname, original\$1value, modified\$1value, trigger, action, action\$1value, error\$1code. | 
| [SVL\$1STATEMENTTEXT](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_STATEMENTTEXT.html) | **Columns:** type, text. | 
| [SVL\$1STORED\$1PROC\$1CALL](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_STORED_PROC_CALL.html) | **Columns:** querytxt. | 
| [SVL\$1STORED\$1PROC\$1MESSAGES](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_STORED_PROC_MESSAGES.html) | **Columns:** message, linenum, querytext. | 
| [SVL\$1UDF\$1LOG](https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_UDF_LOG.html) | **Columns:** message, funcname. | 
| [SVV\$1DISKUSAGE](https://docs.aws.amazon.com/redshift/latest/dg/r_SVV_DISKUSAGE.html) | **Columns:** name, col, tbl, blocknum, num\$1values, minvalue, maxvalue. | 
| [SVV\$1QUERY\$1STATE](https://docs.aws.amazon.com/redshift/latest/dg/r_SVV_QUERY_STATE.html) | **Columns:** rows, bytes, label. | 
| [SVV\$1TABLE\$1INFO](https://docs.aws.amazon.com/redshift/latest/dg/r_SVV_TABLE_INFO.html) | **Columns:** table\$1id, table. | 
| [SVV\$1TRANSACTIONS](https://docs.aws.amazon.com/redshift/latest/dg/r_SVV_TRANSACTIONS.html) | **Columns:** relation. | 

For more information on system tables and views, see [ System tables and views reference](https://docs.aws.amazon.com/redshift/latest/dg/cm_chap_system-tables.html) in the *Amazon Redshift Database Developer Guide*. For information on Amazon Redshift’s ability to dynamically mask query results, see [ Dynamic data masking](https://docs.aws.amazon.com/redshift/latest/dg/t_ddm.html) in the *Amazon Redshift Database Developer Guide*. For information on creating views in the AWS Glue Data Catalog using Amazon Redshift, see [AWS Glue Data Catalog views](https://docs.aws.amazon.com/redshift/latest/dg/data-catalog-views-overview.html) in the *Amazon Redshift Database Developer Guide*.