parallel_parquet/app.py. PyArrow installs in the remote image, and
your machine only runs the coordinator.
The CLI installs once with uv tool install lazycloud-client. The commands
below download a standalone project and install its dependencies, with no
repository checkout. The rest of the guide runs from that directory through
uv run, which uses the project’s pinned SDK.
Choose the input and output paths
Use a bucket you own and a new prefix for the first run:.., backslashes, or empty path
segments. The output key must end in .json.
Give the functions bucket access
Store an access key pair with permission to list and read the input prefix and write the output key. The seed step also needs permission to write its input files.configure.py reads the two credential values from your environment and uses
Secret(...).set(...) to store them under the names in the app’s configuration.
Running it again replaces those values. The LAZYCLOUD_PARQUET_* variables
hold bucket settings and secret names. Keep them exported in the shell that
runs the batch.
The app declares one CloudBucket and attaches it to all four functions with
volumes=[data_bucket]. Edit that definition to change the mount path or
access mode.
For another S3-compatible store, also set its HTTPS endpoint:
Run with sample data
partition_count: 4, row_count: 40, the total
amount_cents, per-partition counts, task IDs, and the output key.
The functions read and write through the same CloudBucket mount.
Process your own files
Each input file needsrecord_id, amount_cents, and category columns.
Set the input prefix to those files and run without seeding:
spawn_map() to start one task per partition and checks
every result before it calls the summary writer.
To rerun the sample on input that already exists, pass false as well. For a
fresh sample, use a new prefix. Passing true as the fourth argument lets the
run replace seed files, so use it only on disposable data.
Read the summary
With the AWS CLI configured for your bucket:--endpoint-url "$LAZYCLOUD_PARQUET_ENDPOINT". The AWS CLI uses its own
credentials, not the LazyCloud workspace secrets.
Investigate a failed partition
The coordinator reports failed task IDs and leaves the previous summary unchanged. Read the named task’s error and logs:Clean up sample data
Function containers shut down after their idle window. Your bucket keeps the input and summary, and its storage and request charges continue. List what the input prefix contains first:--endpoint-url to these commands too.
If you created the two workspace secrets only for this example, delete them:
