Skip to main content

Redshift, EMR, and QuickSight - Data Warehouse and Business Intelligence

Build a modern analytics stack with Redshift for data warehousing, EMR for big data processing, and QuickSight for interactive BI dashboards.

What you will learn

  • OLTP vs OLAP — why your production database is the wrong tool for analytics
  • Amazon Redshift — columnar storage and why it makes analytical queries fast
  • Redshift Serverless vs provisioned clusters — when each makes sense
  • Loading data into Redshift — the COPY command and why it beats INSERT
  • Redshift Spectrum — querying S3 data directly without loading it
  • Amazon EMR — managed Hadoop and Spark for big data processing
  • EMR node types — Master, Core, and Task nodes and their roles
  • Spot Instances with EMR for 90% cost savings on Task nodes
  • Amazon QuickSight — serverless BI dashboards without managing BI servers
  • SPICE — QuickSight's in-memory engine for fast dashboard queries
  • QuickSight Column-Level Security for data access control

Why this matters

Swiggy generates millions of order events, delivery events, and user interactions every day. Running complex analytics on the production RDS database would slow it to a crawl. Redshift is a separate analytical database built for exactly this — query billions of rows in seconds. Razorpay processes billions of transactions — EMR Spark jobs aggregate them into daily summary tables. At Hotstar, the business team builds content performance dashboards in QuickSight without writing a line of code or waiting for the engineering team. These three services together form the analytics layer that turns raw data into business decisions.

OLTP vs OLAP — Why You Need a Separate Database

TEXT
OLTP (Online Transaction Processing) — your production database:
Handles thousands of small transactions per second
INSERT, UPDATE, DELETE individual records
Optimised for write performance and data integrity
Examples: RDS, Aurora, DynamoDB
Row-based storage — reads entire rows
OLAP (Online Analytical Processing) — your analytics database:
Handles a few very large queries
SELECT with GROUP BY, SUM, AVG across millions of rows
Optimised for read performance on large datasets
Example: Redshift
Columnar storage — reads only the columns the query needs

Running analytics on your production OLTP database:

◈ DIAGRAM
SELECT city, COUNT(*), SUM(amount) FROM orders GROUP BY city
On RDS with 500 million rows → full table scan → minutes to complete
During this scan → production writes slow down → users experience lag

Solution: copy data to Redshift. Run analytics there. Production database untouched.

Amazon Redshift — Columnar Data Warehouse

Redshift stores data in columns instead of rows. This makes analytical queries dramatically faster.

◈ DIAGRAM
Row storage (how RDS stores data):
Row 1: Rahul | Mumbai | 450 | 2024-01-15 | delivered
Row 2: Priya | Pune | 120 | 2024-01-15 | pending
Row 3: Arjun | Chennai | 890 | 2024-01-16 | delivered
Query: SELECT SUM(amount) FROM orders
Must read: all columns of all rows (even city, date, status you don't need)
Columnar storage (how Redshift stores data):
Column: Rahul, Priya, Arjun... (names — not needed for this query)
Column: Mumbai, Pune, Chennai... (cities — not needed)
Column: 450, 120, 890... (amounts — ONLY this column is read)
Column: 2024-01-15, ...
Query: SELECT SUM(amount) FROM orders
Reads: ONLY the amount column → 10-100x less data scanned → 10-100x faster

Redshift cluster architecture:

TEXT
Leader Node:
Receives SQL queries from clients
Develops query execution plan
Coordinates Compute Nodes
Returns results to client
Compute Nodes (1 to 128):
Store the actual data
Execute query fragments in parallel
Each node stores a slice of the data
More Compute Nodes = more parallelism = faster queries

Redshift Serverless:

No cluster to manage. Redshift scales automatically based on query demand.

TEXT
Provisioned cluster:
You choose node type and count upfront
Pay 24/7 for the cluster whether or not you are running queries
Good for: predictable, continuous analytics workloads
Serverless:
No cluster — just a namespace and workgroup
Scales automatically
Pay per second of compute used
Good for: intermittent analytics, dev/test, unknown workload

Loading Data Into Redshift — COPY vs INSERT

Never use INSERT for bulk loading.

◈ DIAGRAM
INSERT one row at a time → 1 million rows → 1 million round trips → very slow
COPY command → bulk loads from S3 in parallel across all Compute Nodes
All nodes download their slice simultaneously → orders of magnitude faster
SQL
-- Load data from S3 into Redshift using COPY
COPY orders
FROM 's3://devops-analytics/orders/2024/01/'
IAM_ROLE 'arn:aws:iam::123456789012:role/RedshiftS3Role'
FORMAT AS PARQUET;
-- Parquet is the best format for Redshift loading
-- All Compute Nodes load their slice in parallel

Redshift Spectrum — query S3 without loading:

Create an external table in Redshift that points to S3. Query it with SQL. Data never moves into Redshift.

SQL
-- Create external schema pointing to Glue Data Catalog
CREATE EXTERNAL SCHEMA spectrum_schema
FROM DATA CATALOG
DATABASE 'devops_analytics'
IAM_ROLE 'arn:aws:iam::123456789012:role/RedshiftSpectrumRole'
CREATE EXTERNAL DATABASE IF NOT EXISTS;
-- Query S3 data directly from Redshift
SELECT city, COUNT(*) as orders
FROM spectrum_schema.orders
WHERE year = '2024' AND month = '01'
GROUP BY city;

Spectrum queries S3 data at $5.00 per TB scanned — same as Athena. Useful when you want S3 as your data lake but Redshift as your query interface.

Amazon EMR — Big Data Processing

EMR (Elastic MapReduce) is managed Hadoop, Spark, Hive, Presto, and other big data frameworks. Instead of provisioning and managing a Hadoop cluster yourself, EMR does it for you.

TEXT
Without EMR:
Provision EC2 instances
Install Java, Hadoop, configure HDFS
Configure Spark, Yarn, Hive
Manage updates, failures, scaling
Lots of infrastructure work before writing any data code
With EMR:
Select framework (Spark, Hadoop, etc)
Choose instance types and count
Submit your Spark job
EMR handles everything else

Three EMR node types:

TEXT
Master Node (1 required):
Manages the cluster
Coordinates job distribution
Tracks task progress
Do NOT terminate — losing it terminates the cluster
Core Nodes (1+ required):
Run tasks AND store data in HDFS
Can be scaled — but shrinking risks data loss if not careful
Task Nodes (optional, 0+):
Run tasks ONLY — no HDFS storage
Can be added or removed safely at any time
Perfect for Spot Instances — if Spot is interrupted, no data is lost

Spot Instances on Task Nodes:

TEXT
Master Node: On-Demand (critical — cannot be interrupted)
Core Nodes: On-Demand or Reserved (store data — interruption is risky)
Task Nodes: Spot Instances (no data storage — interruption is safe)
Spot Instances: up to 90% cheaper than On-Demand
A Spark job using 20 Task Nodes on Spot saves 80-90% of compute cost

EMR with S3 as storage:

Instead of HDFS, store data in S3. EMR reads from and writes to S3. Cluster can be terminated when the job finishes — data persists in S3.

◈ DIAGRAM
Transient cluster pattern:
Job arrives → spin up EMR cluster → process data in S3 → write results to S3
Job finishes → terminate cluster → pay only for job duration

This is the most cost-effective EMR pattern for batch workloads.

Amazon QuickSight — Serverless BI Dashboards

QuickSight is AWS's business intelligence service. Non-technical business users can build interactive charts and dashboards from data in S3, Redshift, RDS, Athena, and other sources — without writing code or waiting for the engineering team.

No servers to manage. Scales automatically. Pay per user per month.

Data sources QuickSight connects to:

TEXT
AWS: Athena, Redshift, S3, RDS, Aurora, DynamoDB, OpenSearch
SaaS: Salesforce, ServiceNow, Twitter
On-premises: any database via JDBC

SPICE — in-memory analytics engine:

SPICE stands for Super-fast, Parallel, In-memory Calculation Engine. When you import data into QuickSight, it loads into SPICE.

◈ DIAGRAM
Without SPICE:
Every dashboard interaction → query Redshift → wait for response
Dashboard is slow for large datasets
With SPICE:
Data loaded into memory once
Every dashboard interaction → query SPICE → sub-second response
Redshift is not touched during normal dashboard use

SPICE capacity: 10 GB per user included, can purchase more.

Column-Level Security:

Control which columns different users can see in a dataset.

TEXT
Finance team dashboard: sees all columns including revenue and margin
Sales team dashboard: same dataset, revenue visible, margin column hidden

One dataset. Different views for different teams. Enforced by QuickSight — no separate datasets needed.

Row-Level Security:

Each user sees only rows relevant to them.

TEXT
Arjun (Mumbai region manager): only sees Mumbai data
Priya (Bangalore region manager): only sees Bangalore data
Same dashboard. Filtered automatically by user identity.

Hands-on Lab — Redshift Serverless and QuickSight

Step 1 — Create Redshift Serverless

◈ DIAGRAM
Redshift → Serverless → Get started
Namespace name: devops-namespace
Workgroup name: devops-workgroup
Admin username: admin
Admin password: set a strong password
VPC: your VPC Subnets: select private subnets
Create
Wait for Status: Available (3-5 minutes)

Step 2 — Connect and create a table

◈ DIAGRAM
Redshift → Query editor v2 → Connect to devops-workgroup
SQL
-- Create a sample table
CREATE TABLE orders (
order_id VARCHAR(20),
user_id VARCHAR(20),
amount DECIMAL(10,2),
city VARCHAR(50),
status VARCHAR(20),
order_date DATE
);
-- Insert sample data
INSERT INTO orders VALUES
('ORD-001', 'user-101', 450.00, 'Mumbai', 'delivered', '2024-01-15'),
('ORD-002', 'user-102', 1200.00, 'Pune', 'delivered', '2024-01-15'),
('ORD-003', 'user-101', 89.00, 'Mumbai', 'pending', '2024-01-16'),
('ORD-004', 'user-103', 2500.00, 'Bangalore', 'delivered', '2024-01-16'),
('ORD-005', 'user-102', 340.00, 'Pune', 'cancelled', '2024-01-17');
-- Run analytical query
SELECT city, COUNT(*) as orders, SUM(amount) as revenue
FROM orders
GROUP BY city
ORDER BY revenue DESC;

Step 3 — Connect QuickSight to Redshift

◈ DIAGRAM
QuickSight → Sign up for QuickSight (Standard edition — free trial)
Datasets → New dataset → Redshift (Manual connect)
Enter: workgroup endpoint, database name, credentials
Connect → select orders table → Import to SPICE → Visualize

Step 4 — Create a dashboard

◈ DIAGRAM
QuickSight visual editor:
Visual type: Bar chart
X axis: city
Value: SUM(amount)
Create → see revenue by city chart
Add another visual:
Donut chart → orders by status
Publish dashboard → share with your team

Step 5 — Cleanup

◈ DIAGRAM
QuickSight → Datasets → delete dataset
Redshift → Serverless → delete workgroup and namespace

Common Mistakes to Avoid

Common Mistake

Running analytical GROUP BY queries on production RDS. A query scanning 500 million rows locks I/O and slows down every user on the production database. Analytical queries belong in Redshift. Move data there using AWS Glue or COPY from S3.

Common Mistake

Using INSERT to load data into Redshift. INSERT loads one row at a time. For thousands of rows this is acceptable. For millions of rows it takes hours. Always use COPY from S3 for bulk loading — it parallelises across all Compute Nodes and is orders of magnitude faster.

Tip

The most cost-effective EMR pattern for batch analytics is transient clusters. Spin up the cluster when a job arrives, process data reading from S3 and writing results back to S3, then terminate the cluster when done. You pay only for the minutes the cluster ran. Use Spot Instances for Task Nodes to reduce that cost by 70-80% further.

Resources

AWS Direct Connect vs Site-to-Site VPN Failover

AWS Direct Connect vs Site-to-Site VPN Failover

Direct Connect vs VPN isn't really either/or for production — it's a primary-plus-failover pattern. Here's how to design it, and when either/or is right.

5 min read•Aug 2026
Lambda vs Fargate vs EC2 Spot: The Cost Crossover

Lambda vs Fargate vs EC2 Spot: The Cost Crossover

Lambda vs Fargate vs EC2 Spot, at the crossover where Lambda stops being cheaper — 2026 pricing, invocation thresholds, and interruption math.

5 min read•Aug 2026
Secrets Manager vs Parameter Store vs Vault

Secrets Manager vs Parameter Store vs Vault

AWS Secrets Manager, Parameter Store, and HashiCorp Vault compared for 2026 - cost math, rotation, multi-cloud fit, and the Vault-to-OpenBao fork.

5 min read•Aug 2026
AWS VPC Security: Hardening Every Layer

AWS VPC Security: Hardening Every Layer

Most cloud security incidents start with a misconfigured VPC. Here's how to harden every layer — subnets, Security Groups, NACLs, and IAM — for production.

5 min read•Jul 2026
Event-Driven Architecture on AWS Explained

Event-Driven Architecture on AWS Explained

Event-driven architecture on AWS decouples services and absorbs traffic spikes using SQS, SNS, EventBridge, and Lambda — workflows that scale themselves.

5 min read•Jul 2026
S3 vs RDS vs DynamoDB: Choosing AWS Storage

S3 vs RDS vs DynamoDB: Choosing AWS Storage

Choosing S3, RDS, or DynamoDB wrong costs you in performance, cost, and scalability. Here is a practical decision guide based on your actual access patterns.

5 min read•Jul 2026
AWS Cost Optimisation: Cut Cloud Bills 40-60%

AWS Cost Optimisation: Cut Cloud Bills 40-60%

AWS bills surprise teams every month. Here are the 8 concrete actions that cut cloud spend by 40-60% without touching your application architecture.

5 min read•Jul 2026
EC2 vs Lambda vs Fargate: Choosing AWS Compute

EC2 vs Lambda vs Fargate: Choosing AWS Compute

EC2, Lambda, or Fargate — choosing the wrong AWS compute option costs you money and performance. Here is exactly when to use each one in production.

5 min read•Jul 2026

Explore More in AWS Messaging, Analytics, and Containers

All 6 Topics

Frequently Asked Questions

Is Redshift, EMR, and QuickSight - Data Warehouse and Business Intelligence free to learn on DevOps Network?

Yes - this topic, like everything on DevOps Network, is 100% free with no paywall or sign-up gate.

What does the Redshift, EMR, and QuickSight - Data Warehouse and Business Intelligence topic cover?

Build a modern analytics stack with Redshift for data warehousing, EMR for big data processing, and QuickSight for interactive BI dashboards.