Introduction

In this guide, I’ll walk you through how to build an automated sales reporting dashboard using AWS S3, Snowflake, and Power BI / Oracle Analytics Cloud (OAC). This setup pulls sales data from a fake POS API, stores it in an S3 data lake, loads it into Snowflake for analytics, and visualizes it in OAC or Power BI. The best part? It’s fully automated!

Whether you’re a beginner or an intermediate tech enthusiast, this tutorial will help you understand how modern data pipelines work in a real-world analytics scenario.

⸻

📌 What We Will Cover

✅ Fetching sales data from a fake API ✅ Storing it in AWS S3 (our data lake) ✅ Loading it automatically into Snowflake ✅ Visualizing sales insights in Power BI / OAC ✅ Automating everything with scheduled updates ✅ Future Enhancements: AI-Powered Sales Prediction

⸻

🛠️ Technologies Used • AWS S3 → Cloud storage (data lake) • Snowflake → Cloud-based data warehouse • Power BI / Oracle Analytics Cloud → Data visualization • Python & AWS Lambda → Automate data ingestion • Mock API → Simulate sales transactions

⸻

Step 1: Fetching Sales Data from a Fake API

Since we don’t have a real POS system, we’ll use DummyJSON—a free API that generates random sales transactions.

📌 API Endpoint for Sales Data

https://dummyjson.com/carts

This API returns sample sales transactions, including: • Total sales amount • Discounted sales • Customer ID • List of purchased items

Python Script to Fetch Data

The following script pulls new sales data every few minutes and saves it as a JSON file in AWS S3.

import requests import boto3 import json from datetime import datetime

AWS S3 Configuration

S3_BUCKET = "pos-data-lake" S3_KEY = f"pos_sales_{datetime.now().strftime('%Y-%m-%d-%H-%M-%S')}.json" AWS_ACCESS_KEY = "your-access-key" AWS_SECRET_KEY = "your-secret-key"