Flow is a PHP-based, strongly typed data processing framework with a low memory footprint.
composer require flow-php/etl flow-php/etl-adapter-csvdata_frame()
->read(from_csv(__DIR__ . '/orders.csv'))
->withColumn('revenue', ref('total_price')->minus(ref('discount')))
->groupBy(['created_at'])
->aggregate(sum(ref('revenue')))
->write(to_csv(__DIR__ . '/revenue.csv'))
->run();Flow is created and maintained by Norbert Orzechowicz and built in the open since day one.
- One API for every format. Read and write CSV, JSON, XML, Parquet, Excel, Avro and databases. Change
to_csv()toto_parquet()and the pipeline stays the same. - Bounded memory. At the memory limit, sorts, joins and group-bys spill to disk. Large files do not crash the process.
- Strict schemas. Flow infers the schema or validates the one you declare. Corrupted records go to a file that you choose.
- An optimizer. Flow pushes filters and limits into the source.
explain()shows each stage of the pipeline. - Pure PHP, faster with extensions. Flow runs on every PHP host. Optional native extensions speed up the same pipeline and give identical results.
- No install needed to try it. The playground runs Flow in your browser.
All development happens in one repository: flow-php/flow.
Open issues, discussions and pull requests there.
The other repositories in this organization are read-only copies of single packages. Composer installs packages from them. They do not accept pull requests.
Flow has more than 50 packages. Libraries, bridges and extensions do not depend on the core, so you can use each of them alone.
- Core:
flow-php/etl, the DataFrame - Libraries:
parquet,types,filesystem,telemetry,postgresql - Adapters: CSV, JSON, XML, Parquet, Excel, PostgreSQL and more data sources for the DataFrame
- Bridges: connections to Symfony, PSR-3, OpenTelemetry and cloud filesystems
- Extensions:
arrow-ext,pg-query-ext,flow-php-ext
Packagist has the full list.
- Read the contributing guide first.
- Ask your questions on Discord before you start a large change.
- Use the security policy to report a security problem.
Flow is free and open source. You can sponsor the project on GitHub. The sponsor page lists all sponsors.
