Loading Academy Hub...
Master enterprise data warehousing on AWS: Redshift Serverless compute (RPUs), table distribution styles (KEY, EVEN, ALL), compound vs interleaved sort keys, and Redshift Spectrum querying external S3 Lakehouse tables.
[!NOTE] Amazon Redshift is AWS's petabyte-scale cloud data warehouse. In Redshift Serverless, compute scales automatically in Redshift Processing Units (RPUs) without managing provisioned leader and compute nodes.
customer_id) to execute co-located joins without network shuffle.ALL, automatically promoting to KEY or EVEN as data volume grows.Redshift Processing Units) with a 60-second minimum charge per active burst. Isolate heavy nightly COPY / dbt transformations into a dedicated Workgroup (baseRPU >= 64) separate from BI dashboard workgroups so concurrent SELECT users never queue behind heavy writes.DISTKEY(account_id) (eliminating DS_BCAST_INNER / DS_DIST_BOTH network redistribution) and a COMPOUND SORTKEY(event_date, tenant_id) for fast zone-map block skipping.Review the production code, company interview Q&As, incident traces, and comprehension quiz inside this lesson.
-- Production Redshift Fact Table Definition
CREATE TABLE public.fact_financial_orders (
order_id BIGINT NOT NULL,
customer_id BIGINT NOT NULL,
order_date DATE NOT NULL,
order_amount DECIMAL(14, 2) NOT NULL,
status VARCHAR(20) NOT NULL
)
-- Co-locate with customer_dim on customer_id
DISTSTYLE KEY
DISTKEY (customer_id)
-- Sort by order_date for range scan elimination
COMPOUND SORTKEY (order_date, customer_id);ERROR: Subquery produced duplicate distribution keys. 500310: Query cancelled due to memory limit.