@@ -346,21 +346,13 @@ <h2>Bridges</h2>
346346 < h1 > Example: S3</ h1 >
347347 < h3 > Topic: Filesystem</ h3 >
348348 < hr class ="hidden lg:block "/>
349- < h2 class ="text-xl mt-5 mb-5 "> Description</ h2 >
350- < article id ="example-description "
351- class ="rounded px-4 pt-4 overflow-auto shadow-2xl shadow-gray rounded border-gray border-2 relative mb-10 "
352- data-controller ="all-links-external "
353- >
354- < p > S3 or any S3 like filesystem is coming soon!</ p >
355-
356- </ article >
357349
358350 < h2 class ="text-xl mt-5 mb-5 "> Code</ h2 > < div id ="code " class ="relative "> < button class ="absolute top-[12px] right-[12px] bg-orange-100 rounded px-4 leading-9 [&.copied]:before:content-['Copied!'] before:absolute before:-translate-x-20 " data-clipboard-target ="#code " data-controller ="clipboard "> < img src ="https://flow-php.com/assets/images/icons/copy-c890d86c179d4c56059b8a0e9c88cd23.svg " alt ="copy code " width ="20 " height ="20 " class ="inline "> </ button > < pre class ="rounded p-4 overflow-auto shadow-2xl shadow-gray rounded border-gray border-2 "> < code id ="code " class ="language-php " data-controller ="syntax-highlight " > <?php
359351
360352declare(strict_types=1);
361353
362- use function Flow\ETL\Adapter\CSV\to_csv;
363- use function Flow\ETL\DSL\{config_builder, data_frame, from_array, overwrite};
354+ use function Flow\ETL\Adapter\CSV\{from_csv, to_csv} ;
355+ use function Flow\ETL\DSL\{config_builder, data_frame, from_array, overwrite, to_stream };
364356use function Flow\Filesystem\Bridge\AsyncAWS\DSL\{aws_s3_client, aws_s3_filesystem};
365357use function Flow\Filesystem\DSL\path;
366358use Symfony\Component\Dotenv\Dotenv;
@@ -398,8 +390,40 @@ <h2 class="text-xl mt-5 mb-5">Code</h2><div id="code" class="relative"><button c
398390 ->saveMode(overwrite())
399391 ->write(to_csv(path('aws-s3://test.csv')))
400392 ->run();
393+
394+ data_frame($config)
395+ ->read(from_csv(path('aws-s3://test.csv')))
396+ ->write(to_stream(__DIR__ . '/output.txt', truncate: false))
397+ ->run();
401398</ code > </ pre > </ div > </ div >
402399
400+ < h2 class ="text-xl mt-5 mb-5 "> Output</ h2 >
401+ < div id ="output " class ="relative ">
402+ < button class ="absolute top-[12px] right-[12px] bg-orange-100 rounded px-4 leading-9 [&.copied]:before:content-['Copied!'] before:absolute before:-translate-x-20 " data-clipboard-target ="#output " data-controller ="clipboard "> < img src ="https://flow-php.com/assets/images/icons/copy-c890d86c179d4c56059b8a0e9c88cd23.svg " alt ="copy code " width ="20 " height ="20 " class ="inline "> </ button > < pre class ="rounded p-4 shadow-2xl shadow-gray rounded border-gray border-2 "> < code id ="output " class ="language-bash overflow-auto " data-controller ="syntax-highlight "> +----+------+
403+ | id | name |
404+ +----+------+
405+ | 1 | test |
406+ +----+------+
407+ 1 rows
408+ +----+------+
409+ | id | name |
410+ +----+------+
411+ | 2 | test |
412+ +----+------+
413+ 1 rows
414+ +----+------+
415+ | id | name |
416+ +----+------+
417+ | 3 | test |
418+ +----+------+
419+ 1 rows
420+ +----+------+
421+ | id | name |
422+ +----+------+
423+ | 4 | test |
424+ +----+------+
425+ 1 rows
426+ </ code > </ pre > </ div >
403427
404428 < div class ="mt-5 ">
405429 < script src ="https://giscus.app/client.js "
0 commit comments