damast.core.partitioning

damast.core.partitioning#

Strategies for splitting an AnnotatedDataFrame into multiple export files (e.g. per day, per hour, per mmsi group) - see AnnotatedDataFrame.export_partitioned().

Functions

warn_on_local_time_buckets(keys)

Warn if a materialized partition key buckets by local time instead of UTC.

with_suffix(name, suffix)

Append suffix to a partition's file name, unless the name already ends with it.

Classes

ByColumn(column, *[, prefix])

One file per distinct value of an existing column - e.g. one file per mmsi.

ByExpr(expr, ~polars.expr.expr.Expr], ...)

Escape hatch: any custom key expression plus filename formatter.

ByTime(timestamp_column, every, *[, ...])

One file per time bucket of a timestamp column, truncated to a given interval.

PartitionStrategy()

Splits a dataframe into named partitions for export as separate files.

SaveAs(path[, strategy])

A parsed --save-as-style string: either a plain output path (strategy is None), or a base directory plus PartitionStrategy - see parse() and export().