安全日志记录 - Amazon Redshift
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

从 2025 年 11 月 1 日起,Amazon Redshift 将不再支持创建新的 Python UDF。如果您想要使用 Python UDF,请在该日期之前创建 UDF。现有的 Python UDF 将继续正常运行。有关更多信息,请参阅博客文章

安全日志记录

如果 Amazon Redshift 记录引用一个或多个 Amazon Glue Data Catalog 视图的查询,则 Amazon Redshift 在记录有关该查询的元数据时,会自动屏蔽某些系统表列和视图列中的字段。

安全日志屏蔽适用于 Amazon Redshift 在运行符合屏蔽条件的查询时生成的所有系统表和视图条目。下表列出了应用了安全日志记录、用 ****** 屏蔽文本和用 -1 屏蔽数字的系统视图和列。用于屏蔽文本的星号数量与原始文本中的字符数相匹配,最多 6 个字符。长度超过 6 个字符的字符串仍显示为 6 个星号。

系统表 敏感列
SYS_EXTERNAL_QUERY_DETAIL

列:source_type、total_partitions、qualified_partitions、scanned_files、returned_rows、returned_bytes、file_format、file_location、external_query_text、warning_message。

SYS_EXTERNAL_QUERY_ERROR

列:file_location、rowid、column_name、original_value、modified_value、trigger、action、action_value、error_code。

SYS_QUERY_DETAIL

列:step_id、step_name、table_id、table_name、input_bytes、input_rows、output_bytes、output_rows、blocks_read、blocks_write、local_read_IO、remote_read_IO、spilled_block_local_disk、spilled_block_remote_disk、step_attribute。

SYS_QUERY_HISTORY

列:returned_rows、returned_bytes。

STL_AGGR

列:rows、bytes、tbl、type。

STL_BCAST

列:rows、bytes、packets。

STL_DDLTEXT

列:label、text。

STL_DELETE

列:rows、tbl。

STL_DIST

列:rows、bytes、packets。

STL_ERROR

列:file、linenum、context、error。

STL_EXPLAIN

列:plannode、info。

STL_FILE_SCAN

列:name、line、bytes。

STL_HASH

列:rows、bytes、tbl、est_rows。

STL_HASHJOIN

列:rows、tbl、num_parts、join_type。

STL_INSERT

列:rows、tbl。

STL_LIMIT

列:rows。

STL_MERGE

列:rows。

STL_MERGEJOIN

列:rows、tbl。

STL_NESTLOOP

列:rows、tbl。

STL_PARSE

列:rows。

STL_PLAN_INFO

列:startupcost、totalcost、rows、bytes。

STL_PROJECT

列:rows、tbl。

STL_QUERY

列:querytxt。

STL_QUERY_METRICS

列:max_rows、rows、max_blocks_read、blocks_read、max_blocks_to_disk、blocks_to_disk、max_query_scan_size、query_scan_size。

STL_QUERYTEXT

列:text。

STL_RETURN

列:rows、bytes。

STL_S3CLIENT

列:bucket、key、transfer_size、data_size。

STL_S3CLIENT_ERROR

列:bucket、key、error、transfer_size。

STL_SAVE

列:rows、bytes、tbl。

STL_SCAN

列:rows、bytes、fetches、type、tbl、rows_pre_filter、rows_pre_user_filter、perm_table_name、scanned_mega_value。

STL_SORT

列:rows、bytes、tbl。

STL_SSHCLIENT_ERROR

列:ssh_username、endpoint、command、error。

STL_TR_CONFLICT

列:table_id。

STL_UNDONE

列:table_id。

STL_UNIQUE

列:rows、type、bytes。

STL_UTILITYTEXT

列:label、text。

STL_WINDOW

列:rows。

STV_BLOCKLIST

列:col、tbl、num_values、minvalue、maxvalue。

STV_EXEC_STATE

列:rows、bytes、label。

STV_INFLIGHT

列:label、text。

STV_LOCKS

列:table_id。

STV_QUERY_METRICS

列:rows、max_rows、blocks_read、max_blocks_read、max_blocks_to_disk、blocks_to_disk、max_query_scan_size、query_scan_size。

STV_STARTUP_RECOVERY_STATE

列:table_id、table_name。

STV_TBL_PERM

列:id、name、rows、sorted_rows、temp、block_count、query_scan_size。

STV_TBL_TRANS

列:id、rows、size。

SVCS_EXPLAIN

列:plannode、info。

SVCS_PLAN_INFO

列:rows、bytes。

SVCS_QUERY_SUMMARY

列:step、rows、bytes、rate_row、rate_byte、label、rows_pre_filter。

SVCS_S3LIST

列:bucket、prefix、retrieved_files、max_file_size、avg_file_size。

SVCS_S3LOG

列:message。

SVCS_S3PARTITION_SUMMARY

列:total_partitions、qualified_partitions、min_assigned_partitions、max_assigned_partitions、avg_assigned_partitions。

SVCS_S3QUERY_SUMMARY

列:external_table_name、file_format、s3_scanned_rows、s3_scanned_bytes、s3query_returned_rows、s3query_returned_bytes。

SVL_QUERY_METRICS

列:step_label、scan_row_count、join_row_count、nested_loop_join_row_count、return_row_count、spectrum_scan_row_count、spectrum_scan_size_mb。

SVL_QUERY_METRICS_SUMMARY

列:step_label、scan_row_count、join_row_count、nested_loop_join_row_count、return_row_count、spectrum_scan_row_count、spectrum_scan_size_mb。

SVL_QUERY_REPORT

列:rows、bytes、label、rows_pre_filter。

SVL_QUERY_SUMMARY

列:rows、bytes、rows_pre_filter。

SVL_S3LIST

列:bucket、prefix、retrieved_files、max_file_size、avg_file_size。

SVL_S3LOG

列:message。

SVL_S3PARTITION

列:rows、bytes、label、rows_pre_filter。

SVL_S3PARTITION_SUMMARY

列:total_partitions、qualified_partitions、min_assigned_partitions、max_assigned_partitions、avg_assigned_partitions。

SVL_S3QUERY

列:external_table_name、file_format、s3_scanned_rows、s3_scanned_bytes、s3query_returned_rows、s3query_returned_bytes、files。

SVL_S3QUERY_SUMMARY

列:external_table_name、file_format、s3_scanned_rows、s3_scanned_bytes、s3query_returned_rows、s3query_returned_bytes。

SVL_S3RETRIES

列:file_size、location、message。

SVL_SPECTRUM_SCAN_ERROR

列:location、rowid、colname、original_value、modified_value、trigger、action、action_value、error_code。

SVL_STATEMENTTEXT

列:type、text。

SVL_STORED_PROC_CALL

列:querytxt。

SVL_STORED_PROC_MESSAGES

列:message、linenum、querytext。

SVL_UDF_LOG

列:message、funcname。

SVV_DISKUSAGE

列:name、col、tbl、blocknum、num_values、minvalue、maxvalue。

SVV_QUERY_STATE

列:rows、bytes、label。

SVV_TABLE_INFO

列:table_id、table。

SVV_TRANSACTIONS

列:relation。

有关系统表和视图的更多信息,请参阅《Amazon Redshift 数据库开发人员指南》中的系统表和视图参考。有关 Amazon Redshift 的动态屏蔽查询结果的功能的信息,请参阅《Amazon Redshift 数据库开发人员指南》中的动态数据掩蔽。有关使用 Amazon Redshift 在 Amazon Glue Data Catalog 中创建视图的信息,请参阅《Amazon Redshift 数据库开发人员指南》中的 Amazon Glue Data Catalog 视图