跳转到主内容
跳转到主内容

system.blob_storage_log

在 ClickHouse Cloud 中进行查询

该系统表中的数据保存在 ClickHouse Cloud 中每个节点的本地。因此,如需获得所有数据的完整视图,需要使用 clusterAllReplicas 函数。更多详情请参阅此处

描述

包含记录各种 blob 存储操作 (如上传和删除) 的日志记录。

示例

假设某个 blob 存储操作上传了一个文件,并记录了一个事件:

SELECT * FROM system.blob_storage_log WHERE query_id = '7afe0450-504d-4e4b-9a80-cd9826047972' ORDER BY event_date, event_time_microseconds \G
Row 1:
──────
hostname:                clickhouse.eu-central1.internal
event_date:              2023-10-31
event_time:              2023-10-31 16:03:40
event_time_microseconds: 2023-10-31 16:03:40.481437
event_type:              Upload
query_id:                7afe0450-504d-4e4b-9a80-cd9826047972
thread_id:               2381740
disk_name:               disk_s3
bucket:                  bucket1
remote_path:             rrr/kxo/tbnqtrghgtnxkzgtcrlutwuslgawe
local_path:              store/654/6549e8b3-d753-4447-8047-d462df6e6dbe/tmp_insert_all_1_1_0/checksums.txt
data_size:               259
error:

在此示例中,上传操作与 ID 为 7afe0450-504d-4e4b-9a80-cd9826047972INSERT 查询相关联。本地元数据文件 store/654/6549e8b3-d753-4447-8047-d462df6e6dbe/tmp_insert_all_1_1_0/checksums.txt 对应于磁盘 disk_s3 上存储桶 bucket1 中的远程路径 rrr/kxo/tbnqtrghgtnxkzgtcrlutwuslgawe,文件大小为 259 字节。

另请参阅