JC Etlforge
A minimalist, plugin-driven ETL framework for Python with declarative pipelines, concurrency, and a first-class CLI.
pip install jc-etlforge
jc-etlforge run pipeline.yaml
jc-etlforge is the pytest of ETL: small, composable, extensible, and
installable from PyPI. It does not try to be Airflow — it tries to replace
the ad-hoc Python script that copies data from one place to another.
Table of contents
- JC Etlforge
Why jc-etlforge
Most ETL tools are either too heavy (full platforms with scheduler, UI, and database) or too ad-hoc (one-off scripts that each reimplement parsing, retry, logging, and tests).
jc-etlforge sits in the sweet spot: a small, declarative framework
built around four primitives:
- Source — where data comes from (JSON, CSV, positional files, …).
- Transformer — how data is reshaped (regex, rename, filter, …).
- Sink — where data goes (JSON, CSV, positional files, …).
- Pipeline — a chain that wires sources, transformers, and sinks.
Pipelines are declared in YAML or JSON, executed by pluggable engines (threaded or multiprocessing), and extended through entry-point plugins — no forks required.
Install
Requires Python 3.10+.
pip install jc-etlforge
Verify:
jc-etlforge --version
jc-etlforge info
For development, see Development.
Quickstart
Create data/in.json:
[
{"id": 1, "name": "Alice", "email": "alice@example.com"},
{"id": 2, "name": "Bob", "email": "bob@example.com"},
{"id": 3, "name": "Carol", "email": "carol@example.com"}
]
Create pipeline.yaml:
name: quickstart
source:
type: JsonSource
path: data/in.json
transformers:
- type: RegexTransformer
field: email
pattern: "@example\\.com$"
replacement: "@example.org"
sink:
type: CsvSink
path: output/out.csv
fields: [id, name, email]
Validate and run:
jc-etlforge validate pipeline.yaml
jc-etlforge run pipeline.yaml
Output:
INFO jc_etlforge: pipeline quickstart starting (executor=thread, workers=1, retries=1)
INFO jc_etlforge: pipeline quickstart finished in 0.001s: {'rows.read': 3, 'rows.written': 3, 'rows.transformed': 3}
pipeline 'quickstart' finished in 0.001s
rows.read: 3
rows.transformed: 3
rows.written: 3
output/out.csv:
id,name,email
1,Alice,alice@example.org
2,Bob,bob@example.org
3,Carol,carol@example.org
That's it. No Python code, no if __name__ == "__main__", no retry
boilerplate.
How it works
Layers
flowchart TB
subgraph CLI["CLI"]
info["info"]
validate["validate"]
run["run"]
plugins["plugins list"]
end
subgraph Config["Config"]
load["load_config\n(YAML/JSON → dict)"]
from_config["Pipeline.from_config\n(dict → Pipeline)"]
end
subgraph Core["Core"]
pipeline["Pipeline\n(Source → Transformer… → Sink)"]
context["PipelineContext\n(logger, metrics, config)"]
executor["Executor\n(thread | process | sequential)"]
retry["with_retry\n(exponential backoff)"]
end
subgraph Components["Built-in components"]
sources["Sources: JsonSource,\nCsvSource, PositionalFileSource"]
transformers["Transformers: RegexTransformer,\nRenameTransformer, FilterTransformer"]
sinks["Sinks: JsonSink,\nCsvSink, PositionalFileSink"]
end
subgraph Plugins["Plugins (entry points)"]
third_party["jc_etlforge.transformers\n(third-party packages)"]
end
info --> Core
validate --> Config
run --> Config
plugins --> Plugins
load --> from_config
from_config --> pipeline
pipeline --> context
pipeline --> executor
executor --> retry
pipeline --> sources
pipeline --> transformers
pipeline --> sinks
from_config -.->|resolve type| Components
from_config -.->|resolve type| Plugins
The CLI is a thin shell: it parses arguments, loads config, and
delegates to the core. The core is engine-agnostic: it wires a
Source, zero or more Transformers, and a Sink, and lets an
Executor decide how to fan out process calls.
Data flow
A pipeline is a lazy stream of dict[str, Any] records. Nothing is
read until the sink pulls; each transformer yields records one at a time.
Memory usage is bounded by the largest single record, not by the input
size.
sequenceDiagram
participant CLI
participant Pipeline
participant Source
participant Transformer
participant Sink
participant Context
CLI->>Pipeline: from_config(dict)
CLI->>Context: __enter__()
CLI->>Pipeline: run(ctx, executor, workers, retries)
Pipeline->>Source: read(ctx)
loop for each record
Source-->>Pipeline: record
Pipeline->>Transformer: process(record, ctx)
Transformer-->>Pipeline: transformed | None | list
Pipeline->>Context: record("rows.transformed")
end
Pipeline->>Sink: write(record, ctx)
Sink-->>Pipeline: None
Pipeline->>Context: record("rows.written")
CLI->>Context: __exit__()
CLI-->>CLI: print metrics
Execution model
Pipeline.run accepts three knobs:
| Knob | Default | Effect |
|---|---|---|
executor |
"thread" |
"thread" uses ThreadPoolExecutor; "process" uses ProcessPoolExecutor. |
max_workers |
1 |
1 runs sequentially (no pool overhead); >1 fans out transformer.process across workers. |
retries |
1 |
Total attempts per record when process raises. 1 means "no retry". |
# Sequential (default)
jc-etlforge run pipeline.yaml
# 4 threads (I/O-bound transformers)
jc-etlforge run pipeline.yaml --workers 4
# 4 processes (CPU-bound transformers)
jc-etlforge run pipeline.yaml --executor process --workers 4
# Retry up to 3 times with 0.5s base backoff
jc-etlforge run pipeline.yaml --retries 3 --retry-backoff 0.5
Metrics (rows.read, rows.transformed, rows.written, rows.filtered,
rows.failed) are counted in the parent process, so they are accurate
even with --executor process.
Built-in components
Sources
| Class | Reads | Args |
|---|---|---|
JsonSource |
JSON array or wrapped object | path, records_key, encoding |
CsvSource |
CSV with header | path, delimiter, encoding |
PositionalFileSource |
Fixed-width text | path, layout, encoding, skip_blank_lines |
Transformers
| Class | Does | Args |
|---|---|---|
RegexTransformer |
Regex substitution on one or more fields | field, pattern, replacement, flags, missing |
RenameTransformer |
Rename fields via mapping | mapping |
FilterTransformer |
Keep records matching a predicate | field, op (eq/ne/in/not_in/regex/not_regex), value |
Sinks
| Class | Writes | Args |
|---|---|---|
JsonSink |
JSON array (pretty-printed) | path, encoding |
CsvSink |
CSV with header | path, fields, delimiter, encoding |
PositionalFileSink |
Fixed-width text | path, layout, encoding |
PositionalFileSink accepts a layout of either plain (start, end)
tuples (space-padded, left-aligned) or FieldSpec(start, end, align, fill)
for zero-padding and right-alignment:
layout:
id: {start: 0, end: 5, align: right, fill: "0"} # → "00001"
name: {start: 5, end: 15, align: left, fill: " "} # → "Alice "
Pipeline config
A pipeline is a YAML or JSON file with source, optional
transformers, and sink. Each is a mapping with a type key
(resolved against built-in components, then plugins) and constructor
kwargs.
name: my-pipeline # optional, defaults to "pipeline"
source:
type: JsonSource
path: data/in.json
transformers:
- type: FilterTransformer
field: status
op: eq
value: active
- type: RenameTransformer
mapping:
full_name: name
sink:
type: CsvSink
path: output/out.csv
fields: [id, name, email]
jc-etlforge validate pipeline.yaml parses and validates the config
without executing — useful in CI to catch bad configs before they run.
Format conversion is just a config choice
Because every component speaks dict[str, Any], any combination works:
| From → To | Source | Transformers | Sink |
|---|---|---|---|
| JSON → CSV | JsonSource |
(optional) | CsvSink |
| CSV → JSON | CsvSource |
(optional) | JsonSink |
| CSV → CSV (clean) | CsvSource |
Filter/Rename/Regex |
CsvSink |
| JSON → JSON (clean) | JsonSource |
Filter/Rename/Regex |
JsonSink |
| Positional → CSV | PositionalFileSource |
(optional) | CsvSink |
| CSV → Positional | CsvSource |
(optional) | PositionalFileSink |
Note on types:
CsvSourcereads every value as a string (that is whatcsv.DictReaderdoes). If you needidas an integer in the output JSON, add aCastTransformer(seeexamples/plugins/).
CLI reference
jc-etlforge [OPTIONS] COMMAND [ARGS]...
Commands:
info Print version and environment info.
run Execute a pipeline from a YAML/JSON config.
validate Validate a config without executing it.
plugins list List transformers discovered via entry points.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Unmapped exception (bug — please report) |
| 2 | CLI usage error (reserved by click) |
| 3 | ConfigurationError — bad config file or unknown component |
| 4 | PipelineError / ExecutionError — pipeline failed |
| 5 | PluginError — plugin failed to load or validate |
Scripts can branch on these:
jc-etlforge run pipeline.yaml
case $? in
0) echo "ok" ;;
3) echo "fix your config" >&2; exit 1 ;;
4) echo "pipeline failed" >&2; exit 2 ;;
*) echo "unexpected: $?" >&2; exit 3 ;;
esac
Plugins
Third parties extend jc-etlforge by publishing a package that declares
an entry point under jc_etlforge.transformers:
[project.entry-points."jc_etlforge.transformers"]
titlecase = "my_pkg:TitleCaseTransformer"
After pip install my-pkg, the transformer is available by name in any
pipeline config:
transformers:
- type: titlecase
field: name
List discovered plugins:
jc-etlforge plugins list
See examples/plugins/ for a full working example
(TitleCaseTransformer and CastTransformer).
Where to use it
Legacy data migration
flowchart LR
mainframe["Mainframe\n(EBCDIC, fixed-width)"] --> src["PositionalFileSource"]
src --> regex["RegexTransformer\n(trim padding)"]
regex --> sink["JsonSink / CsvSink"]
sink --> cloud["Cloud warehouse"]
A 30-year-old Cobol export becomes a versioned pipeline.yaml per layout,
testable with jc-etlforge validate in CI.
SaaS integration
flowchart LR
stripe["Stripe API"] --> p1["Plugin: StripeSource"]
zendesk["Zendesk API"] --> p2["Plugin: ZendeskSource"]
p1 --> merge["Merge / filter"]
p2 --> merge
merge --> sink["CsvSink / JsonSink"]
sink --> bi["BI dashboard"]
Two 30-line plugins + one YAML file. Runs on a $5/month VPS on a cron.
CI/CD data pipelines
flowchart LR
cron["GitHub Actions\n(scheduled)"] --> validate["jc-etlforge validate"]
validate -->|valid| run["jc-etlforge run"]
validate -->|invalid| fail["fail the build"]
run --> s3["S3 (CSV)"] --> filter["FilterTransformer"] --> pg["Postgres"]
validate in CI catches broken configs before the cron runs;
--executor process uses all cores of the runner.
Spreadsheet cleanup
flowchart LR
xlsx["clientes.xlsx\n(exported CSV)"] --> src["CsvSource"]
src --> filter["FilterTransformer\n(valid CPF)"]
filter --> rename["RenameTransformer\n(standard columns)"]
rename --> regex["RegexTransformer\n(strip phone)"]
regex --> sink["CsvSink"]
sink --> clean["clientes_limpos.csv"]
The monthly spreadsheet cleanup becomes a reusable YAML file, run in seconds instead of hours.
Plugin ecosystem
flowchart TB
core["jc-etlforge (core)"]
core --> salesforce["jc-etlforge-salesforce"]
core --> snowflake["jc-etlforge-snowflake"]
core --> kafka["jc-etlforge-kafka"]
core --> excel["jc-etlforge-excel"]
The same model that made pytest and mkdocs ecosystems: a small core
plus many focused extensions.
Design decisions
Architectural decisions are recorded as ADRs:
| ID | Decision |
|---|---|
| 0001 | Use modern typing and Python 3.10+ |
| 0002 | PipelineContext and metrics |
| 0003 | Executor abstraction and pickling |
| 0004 | Plugin system via entry points |
| 0005 | Config format and exit codes |
See docs/architecture.md for the full layered
architecture and data flow.
Development
git clone https://github.com/jacivaldocarvalho/jc-etlforge.git
cd jc-etlforge
python -m venv .venv
source .venv/bin/activate
make install # editable install with dev extras
make check # ruff + pytest (what CI runs)
make build # sdist + wheel + twine check
See the Makefile for the full task list (make help).
Roadmap
| Version | Status | Highlights |
|---|---|---|
| 0.1–0.6 | ✅ | Core, components, executors, plugins, CLI |
| 0.7 | 🚧 | Docs, ADRs, examples/plugins/, PyPI release |
| 1.0 | 📋 | API freeze, CastTransformer built-in, async executor |
| 1.x | 📋 | DAG pipelines, aggregate transformers, DB/API sources |
Roadmap items are not commitments — they are directions. See issues for the live list.
License
MIT — see LICENSE.
Author
Jacivaldo Carvalho
Telecommunications Engineer | DevOps Engineer | SRE | Networking
Metadata
Release files for jc-etlforge 0.7.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 | Actions |
|---|---|---|---|---|
| jc_etlforge-0.7.0.tar.gz | 39.4 kB | With provenance | Details for jc_etlforge-0.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jc_etlforge-0.7.0-py3-none-any.whl | Python 3 | none | any | Details for jc_etlforge-0.7.0-py3-none-any.whl |
Total release size: 73.5 kB
Release files / jc_etlforge-0.7.0.tar.gz
| Download URL | jc_etlforge-0.7.0.tar.gz |
|---|---|
| Size | 39.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1a9970d8e356ca3b24f03aad29ac847b61e4dd11a642ca5ef148f9e87a2aecd3
|
|
BLAKE2b-256 checksum How to use checksums |
8be869d9dec08d7353c067e791e16c835130e90b10d0e85720a637ef8c15b07c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logRelease files / jc_etlforge-0.7.0-py3-none-any.whl
| Download URL | jc_etlforge-0.7.0-py3-none-any.whl |
|---|---|
| Size | 34.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
231dedc2dd18bace5353850cafdb6e13a6fbf92685f95849bfb02bc7e4f3f5df
|
|
BLAKE2b-256 checksum How to use checksums |
04285eaa8537e31f1e051e6819cdc6827710799918d59fe0827c023edcabe9e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logSecurity for jc-etlforge 0.7.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for jc_etlforge-0.7.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logA 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.