The Olist Payments Pipeline is designed to ingest, transform, and validate payment data from the raw bronze layer to the silver layer using Databricks Delta Live Tables (DLT).
This project ensures:
- Reliable streaming ingestion from raw data sources.
- Schema consistency between bronze and silver layers.
- Data quality enforcement for key fields.
- Slowly Changing Dimension [Type-1, Type-2]
- Support for downstream analytics and reporting.
Landing Layer (All Data Available)
|
|--[Row data Conming on data lake]
|
Bronze Layer (raw ingestion from data lake)
|
|--[DLT Streaming Pipeline]
|
Silver Layer (cleaned, validated, structured)
|
|--[Machine Learning, Artificial Intelligence, Data Scientist]
|
Gold Layer (Business Ready Data, Star Schema Modeling)
|
|--[Analytical Queries, BI Tools]
|
- Bronze Layer: Contains raw
paymentsdata with minimal validation. - Silver Layer: Cleaned, schema-corrected, and validated
paymentstable ready model building. - Gold Layer : Business Ready Star Schema Model for analysis
paymentstable ready for analysis.
- Source:
olist_cata.bronze.payments - Reads as a streaming table.
- Filters out records where
order_idis null.
| Rule Name | Description |
|---|---|
order_id_not_null |
order_id must not be null |
payment_sequential_not_null |
payment_sequential must not be null |
payment_type_not_null |
payment_type must not be null |
payment_installments_not_null |
payment_installments must not be null |
payment_value_positive |
payment_value must be > 0 |
Silver Table: olist_cata.bronze.payments
| Column Name | Data Type | Nullable |
|---|---|---|
| order_id | STRING | YES |
| payment_sequential | STRING | YES |
| payment_type | STRING | YES |
| payment_installments | STRING | YES |
| payment_value | STRING | YES |
| Column Name | Data Type | Nullable |
|---|---|---|
| order_id | STRING | YES |
| payment_sequential | STRING | YES |
| payment_type | STRING | YES |
| payment_installments | STRING | YES |
| payment_value | STRING | YES |
| ingest_at | TIMESTAMP | NO |
-
Target:
olist_cata.silver.payments -
Column casting ensures compatibility with the declared schema:
order_id→ STRINGpayment_sequential→ INTpayment_type→ STRINGpayment_installments→ INTpayment_value→ DOUBLEingest_at→ TIMESTAMP
-
Filters nulls for NOT NULL fields.
Silver Table: olist_cata.silver.payments
| Column Name | Data Type | Nullable |
|---|---|---|
| order_id | STRING | NO |
| payment_sequential | INT | NO |
| payment_type | STRING | NO |
| payment_installments | INT | NO |
| payment_value | DOUBLE | NO |
| ingest_at | TIMESTAMP | NO |
Building Data Model with ( Star Schema)
Dim_Date
|
Dim_Product — Fact_Sales — Dim_Customer
|
Dim_Store
These rules are enforced using DLT expectations. Records failing these rules are dropped automatically.
- Databricks workspace with DLT enabled
- Delta tables for bronze layer already available (
olist_cata.bronze.payments) - Python 3.9+ runtime
- Clone the repository:
git clone https://github.com/your-org/olist-payments-dlt.git
cd olist-payments-dlt-
Upload the
.pyDLT script to Databricks or your pipeline repo. -
Configure your DLT pipeline:
- Source:
python filefrom repo - Target schema:
olist_cata.silver.payments - Enable streaming mode
- Source:
-
Create a new Delta Live Tables pipeline in Databricks.
-
Attach the pipeline to a cluster with sufficient compute.
-
Configure:
- Storage location (DBFS or external Delta Lake)
- Full refresh or incremental mode
-
Start the pipeline; DLT will automatically process streaming bronze data into silver.
- Monitor pipeline health in the Databricks DLT UI.
- Check data quality metrics and failed records.
- Use Delta table versioning for debugging and rollback.
- Schedule daily or hourly refresh depending on business requirements.
- Fork the repository.
- Create a feature branch:
git checkout -b feature/your-feature. - Commit your changes with descriptive messages.
- Submit a pull request for review.
This project is licensed under the MIT License – see the LICENSE file for details.
I can also create a version with badges, CI/CD info, and visuals for a fully professional README like you’d see in production projects.
Do you want me to make that enhanced version?

