Skip to content

Drprincerajput/supplychain-analytics-pipeline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Supply Chain & Inventory Analytics Pipeline with dbt

This project uses dbt to build a robust, tested, and documented data pipeline for a retail company. The goal is to transform raw operational data into a clean, analytics-ready data warehouse to track key supply chain and inventory metrics, ultimately enabling data-driven decision-making.

Business Case:

A retail company operating multiple stores faces challenges with inventory management—frequent stockouts, excess inventory holding costs, and delayed supplier deliveries impact sales and customer satisfaction. This project aims to leverage analytics to optimize inventory levels, improve demand forecasting, and increase supply chain efficiency.

Tech Stack

  • Data Transformation: dbt (Data Build Tool)
  • Data Warehouse: (e.g., Snowflake, BigQuery, PostgreSQL)
  • Data Visualization: (e.g., Power BI, Tableau)
  • Version Control: Git / GitHub

Key Performance Indicators (KPIs) Tracked

  • The models in this project are built to support the following KPIs:
  • Inventory Turnover Rate: Measures how often inventory is sold and replaced over a period.
  • Stockout Rate: Percentage of orders that could not be fulfilled due to insufficient stock.
  • Dead Stock Percentage: The share of inventory that has not been sold over a defined period.
  • Supplier Lead Time: The average time between placing an order with a supplier and receiving the goods.
  • On-Time Delivery Rate: Proportion of customer orders delivered on or before the promised date.
  • Forecast Accuracy: A measure of how closely demand forecasts match actual sales.

Project Structure

The dbt project follows a layered modeling approach to ensure scalability and maintainability:

  • models/staging: Lightly transformed models that clean and standardize raw data from the sources.
  • models/intermediate: Complex transformations, joins, and business logic are implemented here.
  • models/marts: Final, analytics-ready tables organized into dimensions (dim_) and facts (fct_). These models power the BI dashboard.

How to Run This Project

Clone the repository:

Install dependencies:

dbt deps

Load the raw data: Load the CSV files from the seeds/ directory into your data warehouse.

dbt deps

Build the dbt models: Run all models, tests, and snapshots.

dbt deps

Data Lineage & Documentation

This project uses dbt docs to generate a complete documentation site with a data dictionary and an interactive dependency graph.

To view the documentation, run the following commands and navigate to http://127.0.0.1:8080 in your browser:

dbt deps

Data Lineage Graph:

Graph raw_order

About

A dbt project that transforms raw retail data into a clean data warehouse for supply chain and inventory analytics. Tracks KPIs like inventory turnover, stockout rate, and supplier lead time. Features a layered modeling approach, data quality tests, and historical snapshots.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages