Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@
"tools/phpunit/vendor/bin/phpunit --testsuite=bridge-filesystem-azure-integration --log-junit ./var/phpunit/logs/bridge-filesystem-azure-integration.junit.xml --coverage-clover=./var/phpunit/coverage/clover/bridge-filesystem-azure-integration.coverage.xml"
],
"test:bridge:filesystem-async-aws": [
"tools/phpunit/vendor/bin/phpunit --testsuite=bridge-filesystem-async-aws-unit --log-junit ./var/phpunit/logs/bridge-filesystem-async-aws-unit.junit.xml --coverage-clover=./var/phpunit/coverage/clover/bridge-filesystem-async-aws-unit.coverage.xml",
"tools/phpunit/vendor/bin/phpunit --testsuite=bridge-filesystem-async-aws-integration --log-junit ./var/phpunit/logs/bridge-filesystem-async-aws-integration.junit.xml --coverage-clover=./var/phpunit/coverage/clover/bridge-filesystem-async-aws-integration.coverage.xml"
],
"test:bridge:monolog-http": [
Expand Down
16 changes: 13 additions & 3 deletions documentation/components/bridges/filesystem-async-aws-bridge.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,16 @@ $aws = aws_s3_filesystem(
$fstab = fstab($aws);
```

The **mount protocol** — the URI scheme under which the filesystem is registered in the
`FilesystemTable` — defaults to `'aws-s3'`. Override by passing a fourth argument (e.g.
`aws_s3_filesystem($bucket, $client, options: new Options(), protocol: 'warehouse')`) when you
need to mount the same bucket twice under distinct names or pick a scheme more meaningful to
your application.

## Usage with Flow

To use the AWS S3 filesystem with Flow, you need to mount the filesystem to the configuration.
This operation will mount the S3 filesystem to fstab instance available in the DataFrame runtime.
This operation will mount the S3 filesystem to the fstab instance available in the DataFrame runtime.

```php
$config = config_builder()
Expand All @@ -46,9 +52,13 @@ $config = config_builder()
])
)
);

data_frame($config)
->read(from_csv(path('aws-s3://test.csv')))
->write(to_stream(__DIR__ . '/output.txt', truncate: false))
->run();
->run();
```

`FileStatus` values returned from `list()` and `status()` carry `size` (from S3 `Size` / `ContentLength`)
and `lastModifiedAt` (from `LastModified`) populated directly from the S3 response — no extra HEAD call
is issued when the CLI `flow:filesystem:ls --long` or `flow:filesystem:stat` prints them.
18 changes: 14 additions & 4 deletions documentation/components/bridges/filesystem-azure-bridge.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@ $sdk = azure_blob_service(
## Usage with Flow

To use the Azure Blob filesystem with Flow, you need to mount the filesystem to the configuration.
This operation will mount the Azure Blob filesystem to fstab instance available in the DataFrame runtime.
This operation will mount the Azure Blob filesystem to the fstab instance available in the DataFrame runtime.

The **mount protocol** — the URI scheme under which the filesystem is registered in the
`FilesystemTable` — defaults to `'azure-blob'`. Override via the third argument
(`azure_filesystem($blobService, $options, protocol: 'warehouse')`) when you need to mount the same
container under a different scheme.

```php
$config = config_builder()
Expand All @@ -68,9 +73,14 @@ $config = config_builder()
)
)
);

data_frame($config)
->read(from_csv(path('azure-blob://test.csv')))
->write(to_stream(__DIR__ . '/output.txt', truncate: false))
->run();
```
->run();
```

`FileStatus` values returned from `list()` and `status()` carry `size` (from the `Content-Length`
header / listing property) and `lastModifiedAt` (from the `Last-Modified` header, parsed as RFC 7231)
populated directly from the Azure response — no extra stream is opened when the CLI
`flow:filesystem:ls --long` or `flow:filesystem:stat` prints them.
Loading
Loading