<?php
declare(strict_types=1);
use function Flow\ETL\Adapter\JSON\{to_json};
use function Flow\ETL\Adapter\CSV\from_csv;
use function Flow\ETL\DSL\{data_frame, to_output};
require_once 'vendor/autoload.php';
data_frame()
->read(from_csv(__DIR__ . '/data/orders.csv'))
->limit(10)
->collect()
->write(to_json('./file.jsonl')->asJsonl())
->run();
10:49:04 AM[ERROR]Uncaught throwable 'Error': Call to undefined method Flow\ETL\Adapter\JSON\JsonLoader::asJsonl()
At PIB:15
Documentation refrences a
asJonl()method: https://flow-php.com/documentation/components/adapters/json/#loader---jsonloader---json-linesplayground recreation:
Output