Data Engineering Solution for Public Data Product
A data engineering project demonstrates how to transform synthetic sales events into a publicly accessible data product using dbt, DuckDB, and GitHub Actions.

The project, titled 'Data Foundry,' is a batch data engineering solution that transforms synthetic sales events into reliable tables and publicly accessible results. The data pipeline uses dbt to organize transformations and tests, DuckDB as a local warehouse, and GitHub Actions for pipeline execution and deployment to GitHub Pages. The author explicitly states that no AWS account or services were configured, focusing instead on reproducible ingestion, data quality rules, and automated delivery of a data product. The synthetic dataset includes 1,006 events, of which 1,000 are valid, one is a duplicate, and five are deliberately invalid. These defects were introduced to demonstrate how the pipeline handles errors. The pipeline is designed to track which events are accepted, rejected, and why, ensuring transparency and traceability (Source ID: 1). [1]
The architecture of the pipeline involves three stages: bronze, silver, and gold. The bronze stage loads raw data from synthetic CSV files, while the silver stage applies transformations, validations, and deduplication. Invalid records are quarantined and labeled with specific statuses such as 'invalid_date,' 'invalid_quantity,' or 'unknown_customer.' The gold stage summarizes data into daily and market-level sales reports. This approach ensures that only the latest valid version of each order is included in the final output, while earlier or invalid versions are preserved for auditing purposes. The pipeline also includes automated testing to verify data integrity and ensure that all events are accounted for (Source ID: 1). [1]
The pipeline uses dbt tests to enforce data quality rules, including unique and non-null constraints, valid statuses, and dimension relationships. Additionally, Python scripts independently verify the pipeline's output by reprocessing the CSV files and reconciling revenue calculations. This dual-check mechanism ensures that errors are not overlooked, even if two tables agree on the same mistake. The pipeline's documentation and lineage are generated as part of the build process, and the final results are published to GitHub Pages. The author notes that all 26 data tests passed, and the pipeline successfully generated a public data product with 1,000 accepted orders and USD 154,075.00 in validated revenue (Source ID: 1). [1]
The Data Foundry pipeline is designed to transform synthetic sales events into reliable tables and publicly accessible results. The pipeline is structured into three stages: bronze, silver, and gold. In the bronze stage, raw data is ingested as CSV files through dbt seed, which loads these files as tables. This stage includes type conversion and validation, ensuring that data is properly formatted and ready for further processing. The architecture of the pipeline is described in detail in the Dev.to article, which outlines how the pipeline handles synthetic data with known defects. [1]
Advertisement
In the silver stage, the pipeline performs data transformations, including trimming whitespace and using try_cast to parse dates, quantities, and prices. Invalid conversions produce null values, which are classified with explicit reasons such as invalid_date, invalid_quantity, invalid_price, unknown_customer, or unknown_product. This stage also includes checks against the dimensions, ensuring that records are properly validated and any issues are clearly documented. The Dev.to article explains how these transformations are implemented and how they ensure data quality. [1]
The gold stage summarizes the transformed data into daily_sales and market_sales tables, which provide a high-level overview of orders, units, and revenue. The pipeline includes dbt tests that check unique and non-null keys, dimension relationships, allowed statuses, and valid measures. These tests ensure that the data remains consistent and accurate throughout the pipeline. The Dev.to article highlights how these tests are integrated into the build process and how they help maintain data integrity. [1]
The Data Foundry pipeline begins with the bronze stage, which involves loading synthetic CSV files and dimensions into raw tables. This is achieved using dbt seed, which loads the CSV files as tables. The original order fields are explicitly typed as text to allow the staging process to identify conversion failures in a controlled manner (Dev.to, 2023). [1]
In the silver stage, the pipeline performs data transformations, including trimming whitespace and using try_cast to parse dates, quantities, and prices. Invalid conversions produce null values, which are classified with explicit reasons. The model also checks keys against the dimensions, assigning statuses such as invalid_date, invalid_quantity, invalid_price, unknown_customer, or unknown_product (Dev.to, 2023). [1]
Advertisement
The pipeline includes policies to handle multiple versions of an order, with the highest event_id determining the accepted version. If the latest version is invalid, it is quarantined rather than silently falling back to an earlier version. This ensures that even invalid events are preserved for auditing purposes (Dev.to, 2023). [1]
Sources
Prepared with AI assistance from the cited sources.
The Cali Reporter newsletter
The stories worth your time.
California, the country, and what comes next. Join our free newsletter for reporting that keeps you informed.
More in Technology
- Modern Web Guidance 1.0 and Browser Compatibility
Modern Web Guidance 1.0, announced by Chrome for Developers on November 10, introduces browser compatibility data to assist coding agents in building web features. The initiative emphasizes the importance of fallback…
- Apache mod_http2 Vulnerability Detection with Nmap
A new Nmap scripting module has been developed to detect the Apache mod_http2 vulnerability (CVE-2026-119618), addressing the challenges of identifying affected systems accurately.
- Securing Remote Vendor Access in Industrial Networks
Best practices for managing remote vendor access in operational technology (OT) networks emphasize controlled access points, multifactor authentication, and time-bound sessions to reduce cybersecurity risks.
