dataflow/core

This package is abandoned and no longer maintained. No replacement package was suggested.

DataFlow Core project

dev-master 2014-03-29 18:38 UTC

This package is auto-updated.

Last update: 2023-07-27 08:53:19 UTC


README

Scrutinizer Code Quality Code Coverage Build Status

DataFlow is a library based on sonata/exporter to aggregate or merge multiple data sources and export to multiple writers.

Usage

<?php

$handler = new \DataFlow\Handler();
// add sources
$source1 = new \DataFlow\Source\CsvSourceIterator('data1.csv');
$source2 = new \DataFlow\Source\CsvSourceIterator('data2.csv');
$handler->addSource($source1);
$handler->addSource($source2);
// add writer
$writer = new \DataFlow\Source\CsvWriter('aggregate.csv');
$handler->addWriter($writer);

// aggregate sources
$handler->aggregate();
// or merge based on primary column
// $handler->merge('primary_column_name');

You can also add mappers and filters