Schemas & Data Types#

Schemas#

Schema(columns)

Schema of a table.

Column(name, data_type, *[, nullable, tags, ...])

A named column with a data type, nullability, and optional tags.

TableName(schema, name)

A tuple representing the name of a table.

TableMetadata

Metadata properties for a table.

Primitive Data Types#

DataType

Base class for all supported data types.

Boolean

Boolean data type representing true/false values.

Int8

8-bit signed integer data type.

Int16

16-bit signed integer data type.

Int32

32-bit signed integer data type.

Int64

64-bit signed integer data type.

Int128

128-bit signed integer data type.

UInt8

8-bit unsigned integer data type.

UInt16

16-bit unsigned integer data type.

UInt32

32-bit unsigned integer data type.

UInt64

64-bit unsigned integer data type.

UInt128

128-bit unsigned integer data type.

Float32

32-bit floating point data type.

Float64

64-bit floating point data type.

Decimal

Fixed-precision decimal data type.

Varchar

Variable-length character string data type.

Blob

Binary large object data type.

Json

JSON data type.

Uuid

Universally unique identifier data type.

Date

Calendar date data type.

Time

Time of day data type without timezone.

TimeTz

Time of day data type with timezone.

Timestamp

Timestamp data type without timezone.

TimestampTz

Timestamp data type with timezone.

Interval

Time interval data type.

Nested Data Types#

List

List/array data type containing elements of a single type.

Struct

Structured data type containing named fields.

Map

Map/dictionary data type with key-value pairs.

Partitioning#

Partitioning(columns)

Partition specification for a table.

PartitionColumn()

Individual column of a (multi-column) partition.

Snapshots & Maintenance#

SnapshotMetadata()

Metadata for a DuckLake snapshot.

MaintenanceResult

Result row returned by file compaction maintenance operations.

Data Files#

WriteDataFile(path, *[, statistics, ...])

A new data file to be registered with a table.

DataFileStatistics(num_rows, *[, ...])

Statistics for a data file.

ColumnStats(*[, size_bytes, min_value, ...])

Statistics for a single column in a data file.

DeleteFile(path, num_deletes, *[, ...])

A delete file to be registered with a table.

ScanDataFile(path, statistics, delete_files, ...)

A data file with its associated delete files from a scan.

ScanResult(data_files, inline_data)

Result of scanning a table, containing all data files and their delete files.