Skip to content

S3 ​

Use the S3 source to load files from a bucket prefix. JSON (including gzip), CSV, and Parquet are supported. On restart, objects Skipprd 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://skippr-public-sample-data/bike-hire/. Any AWS account can read it.

Configure ​

python
from skippr import Config, DataSourceS3, LocalStorage, Pipeline

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

Options ​

KeyTypeRequired/DefaultDescription
s3_bucketstringRequiredBucket name
s3_prefixstringNot setKey prefix to list
formatstringInferredjson, csv, or parquet when inference is wrong
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.

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 ​