{"id":29941736,"url":"https://github.com/gajendrasharma-github/retail-sales-analytics-pipeline","last_synced_at":"2025-09-13T21:47:11.869Z","repository":{"id":306902912,"uuid":"1027585044","full_name":"gajendrasharma-github/Retail-Sales-Analytics-Pipeline","owner":"gajendrasharma-github","description":"It is a project to understand end to end data engineering flow from data ingestion, to ETL, and querying the data.","archived":false,"fork":false,"pushed_at":"2025-07-28T09:14:20.000Z","size":495,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-28T11:23:44.316Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gajendrasharma-github.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-28T08:27:08.000Z","updated_at":"2025-07-28T09:14:24.000Z","dependencies_parsed_at":"2025-07-28T11:24:25.548Z","dependency_job_id":"a624d7da-8ed5-4b7a-854c-ea259f099ce1","html_url":"https://github.com/gajendrasharma-github/Retail-Sales-Analytics-Pipeline","commit_stats":null,"previous_names":["gajendrasharma-github/retail-sales-analytics-pipeline"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/gajendrasharma-github/Retail-Sales-Analytics-Pipeline","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gajendrasharma-github%2FRetail-Sales-Analytics-Pipeline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gajendrasharma-github%2FRetail-Sales-Analytics-Pipeline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gajendrasharma-github%2FRetail-Sales-Analytics-Pipeline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gajendrasharma-github%2FRetail-Sales-Analytics-Pipeline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gajendrasharma-github","download_url":"https://codeload.github.com/gajendrasharma-github/Retail-Sales-Analytics-Pipeline/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gajendrasharma-github%2FRetail-Sales-Analytics-Pipeline/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275032740,"owners_count":25393760,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-13T02:00:10.085Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-03T01:27:06.581Z","updated_at":"2025-09-13T21:47:11.799Z","avatar_url":"https://github.com/gajendrasharma-github.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS Retail Sales Analytics Pipeline\n\nThis project demonstrates a simple but complete **Data Engineering pipeline on AWS** for analyzing retail sales data, from raw ingestion to business insights.\n\n## Tools \u0026 Technologies Used\n\n- **Amazon S3** – Data storage (raw + processed)\n- **AWS Glue** – ETL with PySpark (managed Spark)\n- **AWS Glue Crawler** – Data cataloging\n- **Amazon Athena** – SQL-based analytics\n- **Parquet** – Columnar data format (processed output)\n\n\n\n## 1. Business Understanding\n\nThe goal is to analyze daily retail sales to identify:\n- Total revenue by product\n- Sales trends over time\n\nThis helps stakeholders understand top-performing products and revenue trends and can help answer questions like:\n\u003e \"Which product sells the most?\"  \n\u003e \"What days bring in the most revenue?\"\n\n\n## 2. Data Understanding\n\nWe use a CSV dataset containing  the following columns:\n\n| Column          | Type     | Description                     |\n|-----------------|----------|---------------------------------|\n| `Date`          | Date     | Date of sale                    |\n| `Store_ID`      | Integer  | Store identifier                |\n| `Product`       | String   | Product name                    |\n| `Quantity_Sold` | Integer  | Units sold                      |\n| `Revenue`       | Float    | Revenue generated (USD)         |\n\n\n**Location**: `s3://retaildataproject/raw/retail_sales_data.csv`\n\n\n## 3. Data Preparation\n\n**ETL (Extract-Transform-Load)** is done using a **PySpark** job in **AWS Glue**:\n- Load raw CSV from S3\n- Cast columns to correct data types\n- Aggregate: revenue and quantity by product and date\n- Save output to S3 in **Parquet format**\n\n📂 Output location: `s3://retaildataproject/processed/`\n\n\n## 4. Modeling\n\nNo machine learning involved — this project focuses on **data aggregation** and **exploratory data analysis** using SQL.\n\n\n## 5. Evaluation\n\nWe use **Amazon Athena** to evaluate the aggregated data:\n\n**Sample Queries**:\n\n```sql\n-- Total revenue by product\nSELECT Product, SUM(Total_Revenue) AS Revenue\nFROM retail_db.retail_sales_data\nGROUP BY Product\nORDER BY Revenue DESC;\n\n-- Daily revenue trend\nSELECT Date, SUM(Total_Revenue) AS Daily_Revenue\nFROM retail_db.retail_sales_data\nGROUP BY Date\nORDER BY Date;\n```\n\n\n## 🧱 Architecture Diagram\n\n![Architecture](aws-retail-data-pipeline/architecture/architecture_diagram.png)\n\n## Few Screenshots\n\n### Glue Job in AWS\n![Glue Job](aws-retail-data-pipeline/screenshots/AWS_Glue.png)\n\n### Athena SQL Output\n![Athena Query](aws-retail-data-pipeline/screenshots/AWS_Athena.png)\n\n### S3 Folder Structure\n![S3 Structure](aws-retail-data-pipeline/screenshots/AWS_S3.png)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgajendrasharma-github%2Fretail-sales-analytics-pipeline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgajendrasharma-github%2Fretail-sales-analytics-pipeline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgajendrasharma-github%2Fretail-sales-analytics-pipeline/lists"}