system-table-blocks

Retrieves block metadata for table partitions.

Command properties

PropertyDescription
Command typeDriver query
Required permissionNone
License usageNot counted
Parallel executionNot supported
Distributed executionNot supported

Syntax

system-table-blocks table=TABLE [day=DATE] [sk=HEX] [era=LONG]

Options

table=TABLE
Specifies the name of the table whose block information to retrieve. This option is required.
day=DATE
Specifies the date to retrieve block information for, in yyyyMMdd format. If not specified, all dates are retrieved.
sk=HEX
Specifies the partition sub-key to retrieve, in hexadecimal. If not specified, all sub-keys are retrieved.
era=LONG
Specifies the partition identifier to retrieve. If not specified, all partitions are retrieved.

Output fields

FieldTypeDescription
tablestringTable name
partitionstringName of the table partition
block_idintegerBlock number within the table partition
verintegerFile format version of the data block
min_timetimestampTimestamp of the first log in the block
max_timetimestampTimestamp of the last log in the block
log_countlongNumber of records in the block
original_sizelongOriginal size of the block (unit: bytes)
compressed_sizelongCompressed size of the block (unit: bytes)
reservedbooleanReserved status of the block
sto_classintegerInteger value representing the storage partition lifecycle. 09999: Hot tier, 1000019999: Warm tier, 2000029999: Cold tier
sto_pathstringPath where the table and index files are stored
signaturebinaryBlock signature data
ivbinaryBlock encryption initialization vector

Error codes

Parsing errors
Error codeMessageDescription
95121table option is required.The table option was not specified
95122Invalid table name: [table]The table option value is not a valid table name
95123Invalid day value: [day]The day option value cannot be parsed as a date
95124Invalid sk value: [sk]The sk option value is not a valid hexadecimal
95125Invalid era value: [era]The era option value is not a valid integer
Runtime errors

N/A

Description

The system-table-blocks command retrieves block-level metadata for table partitions. You can check the record count, original size, compressed size, and timestamp range for each block.

The table option is required and must specify the table name to query. You can combine the day, sk, and era options to retrieve blocks for specific partitions only.

Examples

  1. Retrieve all block metadata for a specific table

    system-table-blocks table=my_table
    

    Retrieves block metadata for all partitions of the my_table table.

  2. Retrieve blocks for a specific date partition

    system-table-blocks table=my_table day=20260301
    

    Retrieves block metadata for the March 1, 2026 partition of the my_table table.

  3. Calculate compression ratio

    system-table-blocks table=my_table
    | eval ratio = double(compressed_size) / double(original_size) * 100
    | fields partition, block_id, log_count, original_size, compressed_size, ratio
    

    Calculates the compression ratio for each block.