Pass a PartitionScheme to a DataSourceDiscovery's $SetPartitionScheme() method to indicate how the file's paths should be interpreted to define partitioning.

A SchemaPartitionScheme describes how to interpret raw path segments, in order. For example, schema(year = int16(), month = int8()) would define partitions for file paths like "2019/01/file.parquet", "2019/02/file.parquet", etc.

A HivePartitionScheme is for Hive-style partitioning, which embeds field names and values in path segments, such as "/year=2019/month=2/data.parquet". Because fields are named in the path segments, order does not matter.

Factory

Both SchemaPartitionScheme$create() and HivePartitionScheme$create() factory methods take a Schema as a single input argument. The helper function hive_partition(...) is shorthand for HivePartitionScheme$create(schema(...)).

Super class

arrow::Object -> PartitionScheme

Methods

Public methods

Inherited methods

Method clone()

The objects of this class are cloneable with this method.

Usage

PartitionScheme$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Super classes

arrow::Object -> arrow::PartitionScheme -> SchemaPartitionScheme

Methods

Public methods

Inherited methods

Method clone()

The objects of this class are cloneable with this method.

Usage

SchemaPartitionScheme$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Super classes

arrow::Object -> arrow::PartitionScheme -> HivePartitionScheme

Methods

Public methods

Inherited methods

Method clone()

The objects of this class are cloneable with this method.

Usage

HivePartitionScheme$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.