Extracts
Read from various data sources.
Transforms
Shape and optimize for your needs.
Loads
Store and secure in one of many available data sinks.
<?php
declare(strict_types=1);
use function Flow\ETL\DSL\{data_frame, from_sequence_date_period, to_stream};
require __DIR__ . '/../../../autoload.php';
data_frame()
->read(from_sequence_date_period(
'date',
new DateTimeImmutable('2024-01-01 00:00:00 UTC'),
new DateInterval('P1D'),
new DateTimeImmutable('2024-01-01 00:00:00 +60 days'),
))
->collect()
->write(to_stream(__DIR__ . '/output.txt', truncate: false))
->run();
Output
+---------------------------+
| date |
+---------------------------+
| 2024-01-01T00:00:00+00:00 |
| 2024-01-02T00:00:00+00:00 |
| 2024-01-03T00:00:00+00:00 |
| 2024-01-04T00:00:00+00:00 |
| 2024-01-05T00:00:00+00:00 |
| 2024-01-06T00:00:00+00:00 |
| 2024-01-07T00:00:00+00:00 |
| 2024-01-08T00:00:00+00:00 |
| 2024-01-09T00:00:00+00:00 |
| 2024-01-10T00:00:00+00:00 |
| 2024-01-11T00:00:00+00:00 |
| 2024-01-12T00:00:00+00:00 |
| 2024-01-13T00:00:00+00:00 |
| 2024-01-14T00:00:00+00:00 |
| 2024-01-15T00:00:00+00:00 |
| 2024-01-16T00:00:00+00:00 |
| 2024-01-17T00:00:00+00:00 |
| 2024-01-18T00:00:00+00:00 |
| 2024-01-19T00:00:00+00:00 |
| 2024-01-20T00:00:00+00:00 |
| 2024-01-21T00:00:00+00:00 |
| 2024-01-22T00:00:00+00:00 |
| 2024-01-23T00:00:00+00:00 |
| 2024-01-24T00:00:00+00:00 |
| 2024-01-25T00:00:00+00:00 |
| 2024-01-26T00:00:00+00:00 |
| 2024-01-27T00:00:00+00:00 |
| 2024-01-28T00:00:00+00:00 |
| 2024-01-29T00:00:00+00:00 |
| 2024-01-30T00:00:00+00:00 |
| 2024-01-31T00:00:00+00:00 |
| 2024-02-01T00:00:00+00:00 |
| 2024-02-02T00:00:00+00:00 |
| 2024-02-03T00:00:00+00:00 |
| 2024-02-04T00:00:00+00:00 |
| 2024-02-05T00:00:00+00:00 |
| 2024-02-06T00:00:00+00:00 |
| 2024-02-07T00:00:00+00:00 |
| 2024-02-08T00:00:00+00:00 |
| 2024-02-09T00:00:00+00:00 |
| 2024-02-10T00:00:00+00:00 |
| 2024-02-11T00:00:00+00:00 |
| 2024-02-12T00:00:00+00:00 |
| 2024-02-13T00:00:00+00:00 |
| 2024-02-14T00:00:00+00:00 |
| 2024-02-15T00:00:00+00:00 |
| 2024-02-16T00:00:00+00:00 |
| 2024-02-17T00:00:00+00:00 |
| 2024-02-18T00:00:00+00:00 |
| 2024-02-19T00:00:00+00:00 |
| 2024-02-20T00:00:00+00:00 |
| 2024-02-21T00:00:00+00:00 |
| 2024-02-22T00:00:00+00:00 |
| 2024-02-23T00:00:00+00:00 |
| 2024-02-24T00:00:00+00:00 |
| 2024-02-25T00:00:00+00:00 |
| 2024-02-26T00:00:00+00:00 |
| 2024-02-27T00:00:00+00:00 |
| 2024-02-28T00:00:00+00:00 |
| 2024-02-29T00:00:00+00:00 |
+---------------------------+
60 rows