target-s3
target-s3 is a multi-format/multi-cloud Singer target, writing streams to S3-compatible object storage (AWS S3, MinIO, ...) as JSON, JSONL, CSV, or Parquet.
Built with the Meltano Target SDK.
Provenance: this is the
plinxorefork ofcrowemi/target-s3, matured for production use: real gzip compression (the original wrote plaintext behind a misleading.gzextension), corrected JSONL datetime serialization, configurable handling of unparseable source dates (e.g. legacy MySQL/MyISAM zero-dates), and a collision-safe batch filename scheme that guarantees a rerun can never silently overwrite a previous run's files. See NOTICE for the full derivation statement required by the Apache 2.0 license.
Installation
pip install plinxore-target-s3
Configuration
Accepted Config Options
{
"format": {
"format_type": "json",
"format_parquet": {
"validate": true|false
},
"format_json": {},
"format_csv": {}
},
"cloud_provider": {
"cloud_provider_type": "aws",
"aws": {
"aws_access_key_id": "test",
"aws_secret_access_key": "test",
"aws_region": "us-west-2",
"aws_profile_name": "test-profile",
"aws_bucket": "test-bucket",
"aws_endpoint_override": "http://localhost:4566"
}
},
"compression": "gzip|none",
"datetime_error_treatment": "null|max|error",
"prefix": "path/to/output",
"stream_name_path_override": "StreamName",
"include_process_date": true|false,
"append_date_to_prefix": true|false,
"partition_name_enabled": true|false,
"use_raw_stream_name": true|false,
"append_date_to_prefix_grain": "day",
"append_date_to_filename": true|false,
"append_date_to_filename_grain": "microsecond",
"flattening_enabled": true|false,
"flattening_max_depth": int,
"max_batch_age": int,
"max_batch_size": int,
"partition_by": ["tenant=${TENANT}", "dt=${CURRENT_DATE_MINUTE_LEVEL}"]
}
format.format_parquet.validate [Boolean, default: False] - this flag determines whether the data types of incoming data elements should be validated. When set True, a schema is created from the first record and all subsequent records that don't match that data type are cast.
-
partition_by[Array[String], optional]: List of key-value strings (e.g., 'tenant=${TENANT}') to be inserted as partition folders after the stream name in the S3 key path. For example, ifpartition_by: ['tenant=${TENANT}', 'dt=${CURRENT_DATE_MINUTE_LEVEL}']and the stream isAccount, the S3 key will look like:bucket/prefix/Account/tenant=${TENANT}/dt=${CURRENT_DATE_MINUTE_LEVEL}/... -
compression[String, default:"gzip", allowed:"none","gzip"] - compression applied to written files."gzip"produces real gzip output (verified withgzip -t, not just a.gz-named file);"none"disables compression. -
datetime_error_treatment[String, default:"null", allowed:"null","max","error"] - how to handle date/date-time values the SDK can't parse, such as legacy MySQL/MyISAM zero-dates ("0000-00-00 00:00:00")."null"replaces the value with null so the run continues;"error"aborts the run (the SDK's own default behavior if this were unset).
Object key uniqueness & idempotency
Every object key ends in -part-{batch_number:05d}-{uuid} (e.g.
.../year=2026/month=08/day=11/invoices-part-00001-3f2504e0-4f89-11d3-9a0c-0305e82c3301.jsonl.gz),
appended after any append_date_to_filename suffix:
batch_numberis a monotonic counter, reset to 1 at the start of every run, giving batches a readable, ordered position within that run.- The UUID is generated fresh per batch and is what actually guarantees uniqueness: two different runs of the same stream (e.g. a same-day retry) both start counting batches at 1, so the counter alone cannot prevent one run's files from colliding with another's -- the UUID makes that collision structurally impossible regardless of how many times a stream is replayed.
This target only guarantees that a rerun can never silently overwrite a previous run's objects. It does not decide whether a rerun's data should replace or add to what's already been written -- that's a downstream/consumer decision, made per table by how the pipeline reads the objects back:
- A full-refresh table points its reader at a fixed, cleared/replaced path each run.
- An incremental table reads via a glob over the date partition (
year=*/month=*/day=*/*.jsonl.gz) and is expected to accumulate every run's files.
Which of those two a given table needs is decided outside this target (e.g. which path or glob a downstream reader like ClickHouse's s3() table function is pointed at).
Capabilities
aboutstream-mapsschema-flattening
Settings
Configure using environment variables
This Singer target will automatically import any environment variables within the working directory's
.env if the --config=ENV is provided, such that config values will be considered if a matching
environment variable is set either in the terminal context or in the .env file.
Usage
You can easily run target-s3 by itself or in a pipeline using Meltano.
Direct CLI (without Meltano)
target-s3 --version
target-s3 --about
# Test using the "Carbon Intensity" sample:
tap-carbon-intensity | target-s3 --config /path/to/target-s3-config.json
Via Meltano (recommended)
# Install the Meltano CLI (if not already done)
pipx install meltano
# Add this variant explicitly
meltano add loader target-s3 --variant plinxore
# Install the plugins declared in meltano.yml
meltano install
# Run the pipeline
meltano run tap-mysql target-s3
Development
Tests
uv run pytest # fast suite (excludes the load test)
uv run pytest -m load # permanent >=1M-record memory/throughput regression test (several minutes)
SDK Dev Guide
See the Meltano Singer SDK dev guide for more instructions on how to develop your own Singer taps and targets.
Metadata
Release files for plinxore-target-s3 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| plinxore_target_s3-0.1.0.tar.gz | 263.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| plinxore_target_s3-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 452.8 kB
Release files / plinxore_target_s3-0.1.0.tar.gz
| Download URL | plinxore_target_s3-0.1.0.tar.gz |
|---|---|
| Size | 263.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
07c15a9ac057104802ae900a3c605cbba676f33d1ba17f99d43fe5da5efcc6f2
|
|
BLAKE2b-256 checksum How to use checksums |
d8441b2423764c66ca8138c9b5707ce99c15670107769be1daf7ff1ebaa9b42d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|
Release files / plinxore_target_s3-0.1.0-py3-none-any.whl
| Download URL | plinxore_target_s3-0.1.0-py3-none-any.whl |
|---|---|
| Size | 189.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fa7809daf8101808c07a268fdc5e50882028819b8f214d1e3ff28b9ba5b566f1
|
|
BLAKE2b-256 checksum How to use checksums |
575c483b171524df37c0204778298b57636ae1a53f54079471021fa409dc628d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|
Security for plinxore-target-s3 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.