Skip to content

Commit 3851c0a

Browse files
authored
Make loader to set content type on path so remote filesystems can tak… (#1942)
* Make loader to set content type on path so remote filesystems can take it from there * Make Path and Options immutable * Updated dsl definitions * Fixed rector paths & replaced Path usages with DSL * Updated dsl definitions * CS Fixes not detected due to fixer cache
1 parent 205c93d commit 3851c0a

File tree

101 files changed

+1641
-689
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+1641
-689
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
AWS_S3_KEY="xxx"
22
AWS_S3_SECRET="xxx"
3-
AWS_S3_BUCKET="xxx"
3+
AWS_S3_BUCKET="xxx"
4+
AWS_S3_REGION="xxx"

examples/topics/filesystem/s3/code.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22

33
declare(strict_types=1);
44

5+
use function Flow\ETL\Adapter\CSV\to_csv;
6+
use function Flow\ETL\Adapter\JSON\to_json;
57
use function Flow\ETL\Adapter\Parquet\{from_parquet, to_parquet};
6-
use function Flow\ETL\DSL\{config_builder, data_frame, from_array, overwrite, to_stream};
8+
use function Flow\ETL\Adapter\Text\to_text;
9+
use function Flow\ETL\Adapter\XML\to_xml;
10+
use function Flow\ETL\DSL\{config_builder, data_frame, from_array, lit, overwrite, ref, to_stream};
711
use function Flow\Filesystem\Bridge\AsyncAWS\DSL\{aws_s3_client, aws_s3_filesystem};
812
use function Flow\Filesystem\DSL\path;
913
use Symfony\Component\Dotenv\Dotenv;
@@ -40,6 +44,12 @@
4044
]))
4145
->saveMode(overwrite())
4246
->write(to_parquet(path('aws-s3://test.parquet')))
47+
->write(to_csv(path('aws-s3://test.csv')))
48+
->write(to_xml(path('aws-s3://test.xml')))
49+
->write(to_json(path('aws-s3://test.json')))
50+
->withEntry('line', ref('id')->concat(lit('_'), ref('name')))
51+
->drop('id', 'name')
52+
->write(to_text(path('aws-s3://test.txt')))
4353
->run();
4454

4555
data_frame($config)

examples/topics/filesystem/s3/composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,15 @@
44
"license": "MIT",
55
"type": "library",
66
"require": {
7+
"php": "~8.2.0 || ~8.3.0 || ~8.4.0",
78
"flow-php/etl": "1.x-dev",
89
"symfony/dotenv": "^7.2",
910
"flow-php/filesystem-async-aws-bridge": "1.x-dev",
1011
"flow-php/etl-adapter-parquet": "1.x-dev",
12+
"flow-php/etl-adapter-text": "1.x-dev",
13+
"flow-php/etl-adapter-csv": "1.x-dev",
14+
"flow-php/etl-adapter-xml": "1.x-dev",
15+
"flow-php/etl-adapter-json": "1.x-dev",
1116
"flow-php/filesystem": "1.x-dev",
1217
"flow-php/snappy": "1.x-dev",
1318
"flow-php/parquet": "1.x-dev"

0 commit comments

Comments
 (0)