A modern data warehouse built using SQL Server, encompassing robust ETL processes, comprehensive data modeling, and insightful analytics.
- Introduction
- Architecture
- ETL Process
- Data Modeling
- Exploratory Data Analysis (EDA) & Analytics
- Technologies Used
- Getting Started
- Usage
- Contributing
- License
This project demonstrates the creation of a scalable and efficient data warehouse using Microsoft SQL Server. It follows the industry-standard multi-layer medallion architecture (Bronze, Silver, Gold) to ensure data quality, consistency, and accessibility for various analytical needs. The repository includes scripts for ETL, data model definitions, and a suite of SQL queries for in-depth exploratory data analysis and reporting.
The data warehouse is structured using the Medallion Architecture, providing a clear separation of data layers:
- Bronze Layer (Raw Data): Ingests raw data directly from source systems with minimal transformation, preserving the original state.
- Silver Layer (Cleaned & Conformed Data): Transforms and cleanses the raw data, applies data quality rules, and integrates data from different sources into a conformed, enterprise-wide view.
- Gold Layer (Curated & Business-Ready Data): Presents highly aggregated and denormalized data optimized for reporting and analytical consumption, tailored for specific business use cases.
The Extract, Transform, Load (ETL) processes are designed to efficiently move data from source systems into the data warehouse layers. These processes handle data extraction, necessary transformations (cleaning, aggregation, standardization), and loading into the respective Bronze, Silver, and Gold layers.
The data warehouse employs a dimensional modeling approach, featuring fact and dimension tables optimized for analytical queries. The models are designed to support various business reporting and analytical requirements, ensuring data integrity and performance.
Extensive EDA and analytics were performed to derive actionable insights from the data. The following analyses are included:
- Database Exploration: Initial understanding of the database schema and structure.
- Dimension Exploration: Detailed analysis of dimension tables and their attributes.
- Date Exploration: Examination of date-related patterns and trends.
- Measures Exploration: Understanding of key performance indicators and metrics.
- Magnitude Analysis: Analysis of the scale and volume of data.
- Ranking Analysis: Identification of top/bottom performers based on various criteria.
- Change Over Time Analysis: Tracking and analyzing trends and changes over different periods.
- Cumulative Analysis: Calculation of cumulative sums and running totals.
- Performance Analysis: Evaluation of system or business process performance.
- Data Segmentation: Dividing data into meaningful segments for targeted analysis.
- Part-to-Whole Analysis: Understanding the contribution of individual components to a larger whole.
- Customer Reporting: Generating reports focused on customer data.
- Product Reporting: Generating reports focused on product data.
- SQL Server: Core database management system for the data warehouse.
- SQL (Transact-SQL): For ETL scripting, data modeling, and analytical queries.
To get a local copy up and running, follow these simple steps.
- SQL Server (e.g., SQL Server Developer Edition)
- SQL Server Management Studio (SSMS) or Azure Data Studio
- Clone the repository:
git clone [https://github.com/BagelSamurai/SQL-Date-Warehouse-and-Analysis.git](https://github.com/BagelSamurai/SQL-Date-Warehouse-and-Analysis.git)
- Open the SQL scripts in SSMS or Azure Data Studio.
- Execute the
01_Db_exploration.sqlscript to set up the initial database. - Follow the sequence of scripts to create tables, load data (if ETL scripts are provided), and build the data warehouse layers.
- Navigate through the
warehousefolder to find scripts for ETL and data model creation. - Explore the
analyticsfolder for various analytical queries and reporting scripts. - Modify scripts as needed to adapt to your specific data sources or analytical requirements.
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.