from_path_partitions() lists files without reading them: one row per file with its path, the
partitions map, and one column per partition. Use it to discover partitions or build a manifest.
Examples
Partitioning
Description
Documentation
Partitioning is declared on the loader, and lets a reader skip whole directories.
Code
<?php
declare(strict_types=1);
use function Flow\ETL\DSL\{data_frame, from_path_partitions, ref, to_output};
require __DIR__ . '/vendor/autoload.php';
data_frame()
->read(from_path_partitions(__DIR__ . '/data/partitioned/color=*/sku=*/*.csv'))
->withColumn('path', ref('path')->strReplace(__DIR__, '/__ABSOLUTE_PATH__'))
->collect()
->write(to_output(truncate: false))
->run();