flow php

UNIFIED DATA PROCESSING FRAMEWORK

composer require flow-php/etl ^0.10.0

Changelog

elephant
extract

Extracts

Read from various data sources.

arrow
transform

Transforms

Shape and optimize for your needs.

arrow
load

Loads

Store and secure in one of many available data sinks.

Definition


feature source
/**
 * @param Path|string $path
 * @param array<string> $columns - list of columns to read from parquet file - @deprecated use `withColumns` method instead
 * @param Options $options - @deprecated use `withOptions` method instead
 * @param ByteOrder $byte_order - @deprecated use `withByteOrder` method instead
 * @param null|int $offset - @deprecated use `withOffset` method instead
 */
from_parquet(Path|string $path, array $columns, Options $options, ByteOrder $byte_order, ?int $offset) : ParquetExtractor

Usage Examples


Example: Data source - Parquet

<?php

declare(strict_types=1);

use function Flow\ETL\Adapter\Parquet\from_parquet;
use function Flow\ETL\DSL\{data_frame, to_stream};

require __DIR__ . '/../../../autoload.php';

data_frame()
    ->read(from_parquet(
        __DIR__ . '/input/dataset.parquet',
    ))
    ->collect()
    ->write(to_stream(__DIR__ . '/output.txt', truncate: false))
    ->run();

Contributors

Join us on GitHub external resource
scroll back to top