Skip to content
Search
Examples

Data frame

Description

Write data to Floe files. Floe is Flow's native self-describing binary format — the schema travels inside the file, so it reads back through the DataFrame API with no external metadata.

Documentation

Code

<?php

declare(strict_types=1);

use function Flow\ETL\Adapter\CSV\from_csv;
use function Flow\ETL\DSL\{data_frame, overwrite};
use function Flow\Floe\DSL\to_floe;

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

data_frame()
    ->read(from_csv(__DIR__ . '/data/orders.csv'))
    ->limit(10)
    ->collect()
    ->saveMode(overwrite())
    ->write(to_floe(__DIR__ . '/output.floe'))
    ->run();
Contributors

Built in the open.

Join us on GitHub
scroll back to top