Partitions can refer to one or more columns, possibly with transformations such as hashing or bucketing.
Column name | Column type | |
---|---|---|
partition_id |
BIGINT |
|
table_id |
BIGINT |
|
partition_key_index |
BIGINT |
|
column_id |
BIGINT |
|
transform |
VARCHAR |
partition_id
refers to apartition_id
from theducklake_partition_info
table.table_id
refers to atable_id
from theducklake_table
table.partition_key_index
defines where in the partition key the column is. For example, in a partitioning by (a
,b
,c
) thepartition_key_index
ofb
would be1
.column_id
refers to acolumn_id
from theducklake_column
table.transform
defines the type of a transform that is applied to the column value, e.g.year
.
The table of supported transforms is as follows.
Transform | Source Type(s) | Description | Result Type |
---|---|---|---|
identity |
Any | Source value, unmodified | Source type |
year |
date , timestamp , timestamptz , timestamp_s , timestamp_ms , timestamp_ns |
Extract a date or timestamp year, as years from 1970 | int64 |
month |
date , timestamp , timestamptz , timestamp_s , timestamp_ms , timestamp_ns |
Extract a date or timestamp month, as months from 1970-01-01 | int64 |
day |
date , timestamp , timestamptz , timestamp_s , timestamp_ms , timestamp_ns |
Extract a date or timestamp day, as days from 1970-01-01 | int64 |
hour |
timestamp , timestamptz , timestamp_s , timestamp_ms , timestamp_ns |
Extract a timestamp hour, as hours from 1970-01-01 00:00:00 | int64 |