-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplified filesystem streams (#993)
* Simplified filesystem streams * Updated UPGRADE.md * Updated dependencies * Fixed failing examples
- Loading branch information
1 parent
bee0204
commit d5ea7d4
Showing
68 changed files
with
1,527 additions
and
1,713 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use function Flow\ETL\Adapter\CSV\from_csv; | ||
use function Flow\ETL\Adapter\CSV\to_csv; | ||
use function Flow\ETL\DSL\df; | ||
use function Flow\ETL\DSL\overwrite; | ||
|
||
require __DIR__ . '/../../../autoload.php'; | ||
|
||
df() | ||
->read(from_csv(__DIR__ . '/input/file.csv')) | ||
->saveMode(overwrite()) | ||
->write(to_csv(__DIR__ . '/output/file.csv')) | ||
->run(); | ||
|
||
df() | ||
->read(from_csv(__DIR__ . '/output/file.csv')) | ||
->saveMode(overwrite()) | ||
->drop('name') | ||
->write(to_csv(__DIR__ . '/output/file.csv')) | ||
->run(); | ||
|
||
// content of /output/file.csv: | ||
// id | ||
// 1 | ||
// 2 | ||
// 3 | ||
// 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
id,name | ||
1,"John Doe" | ||
2,"Jane Doe" | ||
3,"Tom Doe" | ||
4,"Jerry Doe" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.