Skippr is now Manifold.

Skip to content

S3 ​

Use the S3 source to load files from a bucket prefix. JSON (including gzip), CSV, and Parquet are supported. Parquet objects are decoded row group by row group into Arrow IPC. On restart, objects Mfd has already committed are skipped.

Before you begin ​

  • A bucket and prefix the caller can ListBucket and GetObject.
  • AWS credentials in the environment or an instance role.
bash
export AWS_ACCESS_KEY_ID="..."
export AWS_SECRET_ACCESS_KEY="..."
export AWS_DEFAULT_REGION="us-east-1"

Public sample data used in the quickstarts is s3://mfd-public-sample-data/bike-hire/. Any AWS account can read it.

Configure ​

python
from mfd import Config, DataSourceS3, LocalStorage, Pipeline

cfg = Config().workspace("bikehire").storage(LocalStorage())
src = cfg.data_source(
    "sample",
    DataSourceS3(s3_bucket="mfd-public-sample-data", s3_prefix="bike-hire"),
)
cfg.pipeline("bikehire", Pipeline(data_source=src))
cfg.save()
bash
mfd --workspace bikehire --storage-mode local connect data-source s3 \
  --pipeline bikehire \
  --name sample \
  --s3-bucket mfd-public-sample-data \
  --s3-prefix bike-hire
yaml
data_sources:
  sample:
    S3:
      s3_bucket: mfd-public-sample-data
      s3_prefix: bike-hire
bash
mfd discover --pipeline bikehire
mfd sync --pipeline bikehire --once --log

Options ​

KeyTypeRequired/DefaultDescription
s3_bucketstringRequiredBucket name
s3_prefixstringNot setKey prefix to list
formatstringjsonjson, csv, xml, parquet, avro, or arrow_ipc
batch_size_secondsintegerNot setMax seconds per read batch
batch_size_bytesintegerNot setMax bytes per read batch
endpoint_urlURLNot setS3-compatible endpoint
regionstringNot setRegion if it is not inferred
s3_prefix_ordered_depthinteger0How many prefix levels to walk in order
s3_delimiterstring/Listing delimiter

Environment variables ​

VariableDescription
AWS_ACCESS_KEY_IDAccess key
AWS_SECRET_ACCESS_KEYSecret key
AWS_DEFAULT_REGIONRegion

What gets synced ​

Each object under the prefix becomes records in a namespace derived from the key. Progress is the object key plus last-modified time. New objects and updated objects are read; deleted objects are not retracted. Parquet is decoded one row group at a time as Arrow IPC; only the last chunk uses the object key, so a restart skips objects Mfd has already committed.

Troubleshooting ​

SymptomFix
Access DeniedGrant s3:GetObject and s3:ListBucket
NoSuchBucketCheck the name and region
No files foundCheck s3_prefix matches the keys (no leading s3://)
Wrong parseSet format explicitly

Next steps ​