Intermediate Business Intelligence & Retail Data Warehousing Batch ETL

Executive BI Datamart Pipeline: Redshift Serverless & Glue ETL

Automating dimensional data warehouse transforms from transactional OLTP databases into Redshift Serverless and Amazon QuickSight.

Estimated Reading Time: 8 mins
AWS Services: 3 integrated
Production Benchmark & ROI Targets
Nightly ETL Duration
14 mins
Executive Dashboard Speed
1.2s
Warehouse Idle Cost
$0.00

1. Business Problem & Context

An international retail brand ran complex analytical SQL queries directly against their production PostgreSQL databases. Nightly sales report generation locked production tables, causing order checkout slowdowns. Furthermore, queries scanning multi-year sales trends took 45 minutes to execute in standard databases.

2. Requirements & Constraints

  • Zero Impact on Production OLTP: Analytical queries must never query production transactional databases.
  • Sub-2s Executive Dashboards: C-level dashboards in Amazon QuickSight must load in under 2 seconds.
  • Serverless Cost Model: Automatically shut down warehouse compute when no queries are running.

3. Architecture Overview & Data Flow

Executive BI Data Warehouse Architecture
Rendering Architecture Topology...

Interactive Architecture Diagram (Use controls to zoom & pan)

4. AWS Services Used & Rationales

AWS Services Architecture Rationale

Concrete reasons why these specific services were chosen over alternatives

Service Category Architectural Rationale ("Why this service?")
Amazon Redshift Serverless Analytics Columnar data warehouse that scales Redshift Processing Units (RPUs) dynamically and pauses when idle.
AWS Glue (Apache Spark) Analytics Transforms raw normalized transactional tables into a star schema (Fact Sales, Dim Customers, Dim Stores).
Amazon QuickSight Analytics Provides paginated executive reports and ML-powered automated anomaly insights.

5. Key Design Trade-offs

Architecture Decision & Trade-Off Matrix

Evaluating alternative approaches under real-world constraints

Dedicated Provisioned Redshift Cluster (dc2.8xlarge)

  • + Fixed monthly predictable cost
  • Billed 24/7 even when idle ($3,500/mo)
  • Manual resizing requires cluster downtime
Architectural Verdict: Costly for sporadic reporting.

Redshift Serverless (Chosen)

✓ Chosen Design
  • + Charges only for query runtime seconds
  • + Automatically handles complex aggregations
  • + $0.00 spend at night
  • Requires base RPU and max RPU ceiling limits
Architectural Verdict: Superior architecture for modern BI reporting.

6. Implementation Highlights

Redshift DDL Star Schema Table Design with Distribution Keys
CREATE TABLE fact_sales (
    sale_id BIGINT IDENTITY(1,1),
    customer_id INT NOT NULL,
    store_id INT NOT NULL,
    sale_timestamp TIMESTAMP NOT NULL,
    total_amount DECIMAL(12,2) NOT NULL
)
DISTKEY(customer_id)
SORTKEY(sale_timestamp);

7. Results & Key Metrics

  • Report Query Performance: Dropped from 45 minutes to 1.4 seconds.
  • Production DB Health: 0% CPU impact on transactional checkout systems.

8. Key Architectural Takeaways

OLTP vs OLAP Rule: Never run heavy aggregate business intelligence queries against production transactional databases. Always ETL into a dedicated columnar warehouse like Redshift Serverless.

9. Interactive Knowledge Check

Architecture Knowledge Check
Question1of1
Question01

Why are columnar data warehouses like Redshift vastly faster for BI aggregates (e.g. SUM, AVG) than row-oriented databases like PostgreSQL?

10. Official AWS References