
Building OpenIngest: Designing a Configuration-Driven Data Ingestion Framework in Python
How I built an open-source ingestion framework featuring dynamic dataset discovery, schema validation, incremental loading, Airflow orchestration, and data quality monitoring.
Every data engineering project eventually faces the same problem
Data engineering projects rarely fail because reading a CSV is difficult.
They become difficult because every new data source introduces another ingestion script, another validation routine, another scheduling configuration, and another monitoring workflow. What starts as a single Python script gradually turns into dozens of independent pipelines that are difficult to maintain, extend, and observe.
I've experienced this pattern repeatedly. A project begins with a CSV file, then another dataset arrives, followed by Excel workbooks, REST APIs, cloud storage, and eventually scheduled production workflows. The ingestion layer slowly becomes a collection of unrelated scripts rather than a reusable system.
I wanted to explore a different approach—one where ingestion became a reusable framework rather than a series of one-off programs.
That idea became OpenIngest.
Design Goals
Rather than building another ETL script, I wanted to build a framework that could answer a few simple questions:
- Can adding a new dataset require configuration instead of Python code?
- Can ingestion logic remain identical regardless of where the data comes from?
- Can schema validation, quality checks, metadata collection, and orchestration become built-in capabilities instead of optional additions?
- Can new connectors be added without modifying the framework itself?
Those questions shaped every architectural decision.
Architecture Overview
OpenIngest treats every source exactly the same. Regardless of whether data originates from a CSV file, an Excel workbook, Amazon S3, Azure Blob Storage, Google Cloud Storage, or a REST API, the pipeline follows a consistent lifecycle.
Data Sources─────────────────────────────────────────────CSVExcelJSONParquetREST APIsAmazon S3Azure Blob StorageGoogle Cloud StorageCustom Plugins───────────────────────────────────────────── │ ▼ Connector Layer │ ▼ Dataset Discovery │ ▼ Schema Validation │ ▼ Data Quality Engine │ ▼ Full / Incremental Loader │ ▼ PostgreSQL Staging Tables │ ▼ Metadata Collection │ ▼ Reports • Dashboard • History │ ▼ Dynamic Apache Airflow
Every stage has a single responsibility, making the framework easier to understand, test, and extend.
Configuration Instead of Code
One of the key ideas behind OpenIngest is that datasets should be described rather than programmed.
Instead of writing a new ingestion script for every source, users register datasets using YAML.
customers: source: type: csv file: customers.csv
staging_table: stg_customers
load_strategy: replace
primary_key: - customer_id
Changing datasets becomes a configuration task rather than a development task.
Connectors: Abstracting Data Sources
The initial version of OpenIngest only supported CSV files.
Rather than hardcoding file formats into the ingestion engine, I introduced a connector abstraction that separates how data is read from how data is processed.
Today the framework supports:
Connector | Status |
|---|---|
CSV | ✅ |
Excel | ✅ |
JSON | ✅ |
Parquet | ✅ |
Amazon S3 | ✅ |
Azure Blob Storage | ✅ |
Google Cloud Storage | ✅ |
REST APIs | ✅ |
Each connector implements a common interface, allowing the ingestion engine to process every dataset identically once it has been loaded into a DataFrame.
This significantly reduced coupling throughout the codebase.
Plugin Architecture
One design decision I wanted early was extensibility.
Instead of embedding every connector directly into the framework, OpenIngest provides a connector registry.
New connectors can register themselves without modifying the core project.
This means organizations can implement proprietary connectors—for example Snowflake, SAP, Salesforce, SharePoint, or internal systems—without maintaining a fork of the framework.
The ingestion engine simply asks the registry for the requested connector and executes it.
Schema Validation
Before any data reaches the database, OpenIngest validates every dataset against its declared schema.
Validation includes:
- Required columns
- Missing fields
- Additional columns
- Type consistency
If validation fails, ingestion stops immediately.
Stopping early prevents invalid datasets from propagating downstream.
Data Quality
Correct schema does not necessarily mean good data.
For this reason OpenIngest includes a dedicated quality engine supporting:
- Non-null validation
- Primary key validation
- Duplicate detection
- Type validation
- Range validation
- Regular expression validation
- Custom business rules
Each dataset receives both a PASS/FAIL status and a quality score, allowing quality to become part of the ingestion lifecycle rather than an afterthought.
Incremental Loading
Processing the entire dataset every execution is rarely efficient.
OpenIngest supports three loading strategies:
- Replace
- Append
- Incremental
Incremental mode combines watermark tracking with SHA-256 hashing to detect both new records and updated records.
This significantly reduces processing time while maintaining correctness.
Metadata and Observability
Operational visibility became increasingly important as more datasets were introduced.
Every execution records metadata, including:
- Run identifier
- Dataset status
- Execution duration
- Rows processed
- Load strategy
- Watermark
- Quality score
These metadata tables power both reporting and monitoring.
Dynamic Airflow Integration
One challenge with Apache Airflow is keeping DAGs synchronized with datasets.
OpenIngest eliminates manual DAG maintenance by generating Airflow task groups dynamically from configuration.
Adding a dataset automatically adds a new task group.
Removing a dataset removes it from the workflow.
No DAG modifications are required.
Command-Line Experience
The framework exposes a single command-line interface.
openingest run
openingest validate
openingest quality
openingest report
openingest dashboard
openingest history
openingest discover
openingest scheduler start
The same engine powers both the CLI and Airflow execution.
Engineering Decisions
Several architectural choices proved particularly valuable during development:
- Configuration over hardcoded pipelines.
- Connector abstraction instead of source-specific ingestion logic.
- Plugin architecture for extensibility.
- Metadata-first design for observability.
- Quality validation before loading.
- Dynamic workflow generation instead of manually maintained orchestration.
- Separate ingestion, validation, and connector layers to reduce coupling.
These decisions made it possible to expand the framework without rewriting its core.
Evolution of OpenIngest
The project evolved incrementally rather than attempting to solve every problem in its first release.
v1.0 — Core Framework
The initial version introduced:
- Configuration-driven dataset discovery
- Schema validation
- Full and incremental loading
- Automatic table creation
- Metadata tracking
- Dynamic Airflow DAG generation
- Monitoring dashboard
v2.0 — Connector Expansion (Shipped)
The next milestone transformed OpenIngest into a multi-source ingestion platform.
New capabilities included:
- Amazon S3 connector
- Azure Blob Storage connector
- Google Cloud Storage connector
- Excel connector
- JSON connector
- Parquet connector
- REST API connector
- Plugin architecture for custom connectors
The ingestion engine itself remained unchanged—only the connector layer expanded, validating the original design.
v2.5 — Operational Features (Shipped)
The focus then shifted from ingestion to operations.
Features added include:
- Built-in cron scheduler (no Airflow required)
- Slack notifications
- Email notifications
- Enhanced monitoring and execution management
These additions allow OpenIngest to run effectively in both lightweight local environments and larger orchestrated deployments.
Looking Ahead
Several areas remain interesting opportunities for future development:
- Interactive web-based lineage visualization
- Web dashboard
- Role-Based Access Control (RBAC)
- PyPI publication for simplified installation
- Dataset profiling and statistics
- Configurable retry and recovery policies
Lessons Learned
Building OpenIngest reinforced an important lesson:
Moving data is relatively easy.
Building an ingestion system that remains maintainable as datasets, formats, connectors, and operational requirements continue to grow is the real challenge.
By separating configuration from implementation, abstracting data sources through connectors, integrating quality and observability into the ingestion lifecycle, and designing for extensibility from the beginning, OpenIngest evolved from a simple CSV loader into a reusable data ingestion platform.
While there is still room to grow, the project demonstrates how thoughtful architecture can reduce repetitive engineering work and create a framework that scales with changing requirements rather than fighting against them.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article