
Explore the trainer's decade of experience in data warehousing—data marts and media reporting tools—as they guide you through the Amazon Redshift course.
After completion of the course, you will understand the Redshift architecture, Launch your own Redshift cluster, Create S3 bucket, create AWS IAM user, create AWS VPC, master writing effective queries and tune queries for better performance.
Explore Amazon Redshift architecture: a petabyte-scale, fully managed data warehouse cluster with leader and compute nodes, parallel query execution, and data slices, enabling scalable, fast analytics via standard JDBC/ODBC connections.
Launch a Redshift cluster and record the endpoint, username, and password. Configure a VPC security group to allow inbound port 5439 and test the connection with system tables.
Compare columnar and row oriented databases, showing how columnar storage reduces disk usage and I/O, enables column-wise compression, and reads only needed columns, as Amazon Redshift illustrates.
Create schema and tables in Redshift for a demo database, manage users (create and drop), and load data from S3 with copy; use a manifest for parallel, multi-file loading.
Explore the distinct clause in sql to retrieve unique values from one or more columns, such as distinct location or distinct location and employee name from a table.
Apply where predicates in sql to filter data on Amazon Redshift, using comparisons, in, like, ilike, and between, while handling case sensitivity and multiple conditions.
Sort the employees table by salary in ascending order with a select statement, or in descending order using the appropriate keyword for active employees filtered by location and name.
Explore aggregate functions in Redshift, including sum, count, min, max, and list aggregation, and learn how to group by location, use distinct, and format results with delimiters.
Learn inner, left, right, and full joins in databases with an employee and location example, illustrating how outer joins preserve non-matching rows with nulls.
Use union to append data from multiple selects and remove duplicates. Use union all for faster results, intersect for common records, and except to exclude records from a second query.
Use the having clause to filter grouped payroll data by location, selecting active employees with salaries over 500000, as shown for California and Chicago.
Master data transfer in Redshift by using select into, insert into, and alter table to copy, append, or create tables, with techniques for ignoring extra columns and filling nulls.
Explore altering tables in Redshift by adding, dropping, and renaming columns, and use update statements to modify data, with production checks for column existence.
Explore how data moves between disk and memory in Redshift, highlighting columnar storage, selective column reads, and in-memory temporary tables to minimize I/O costs.
Master type casting in Redshift by using cast and convert to transform data between characters, timestamps, and numbers. Format dates with to_char and to_date, and extract date parts.
Explore how to use coalesce to return the first non-null value between primary and secondary customer names, and apply decode and case when patterns to handle nested nulls in redshift.
Explore window functions in Redshift, ranking salaries by location using partition by location and order by salary desc, and using lead, dense_rank, and value functions to analyze employees.
Explore creating user defined functions in Redshift to encapsulate recurring logic, return values, and run code in SQL or Python as needed.
Understand how sort keys and distribution keys optimize redshift queries by block pruning with min/max maps, and compare compound versus interleaved sort keys.
Learn how Redshift distributes tables across the leader and compute nodes with slices, and how to detect and distribute related data on the same slice to improve join performance.
Explore distribution styles in Amazon Redshift, including key distribution, even distribution, and all distribution, and how hashed values map data to cluster slices across nodes.
Create a Redshift table with distribution style and sort keys, specify dist key and sort key, and analyze compression, verify distribution, and run vacuum for performance.
Define primary and foreign keys between customer and order tables, and create views in Amazon Redshift to query data from underlying tables.
The module explains how Amazon Redshift uses column-level compression to reduce storage and speed up queries, detailing dictionary encoding, delta encoding, and mostly encoding.
Explore how to manage workload in Amazon Redshift. Balance concurrent queries, memory usage, and admin controls to terminate long-running tasks and ensure resources for all users.
Learn to configure Amazon Redshift workload management by creating query queues, including a super user queue, with up to eight queues and fifty slots, using the management console.
Configure workload management concurrency in Amazon Redshift, understand why concurrency levels matter, manage query queues like Q1, and prioritize faster queries while enabling up to five parallel queries.
learn how to manage workload with wlm user groups in Amazon Redshift, assign users to groups, route queries to specific queues, and view group membership and configuration.
Allocate memory percentages to queries in WLM, illustrating how Q1 receives 40 percent while the default gets 60 percent. Ensure the total memory percent across queues sums to 100.
Learn how to configure WLM timeout in Amazon Redshift to cancel or move long-running queries after a specified time, while excluding returning results and maintenance tasks like analyze and vacuum.
Explore how Amazon Redshift workload management enables query hopping between queues, using Q1 and Q2, time thresholds, prerelease rights, and cancellations when limits are reached.
SELECT SCHEMA schemaname,
"table" tablename, table_id tableid, size size_in_mb,
CASE WHEN diststyle NOT IN ('EVEN','ALL') THEN 1 ELSE 0 END has_dist_key,
CASE WHEN sortkey1 IS NOT NULL THEN 1 ELSE 0 END has_sort_key,
CASE WHEN encoded = 'Y' THEN 1 ELSE 0 END has_col_encoding,
CAST(max_blocks_per_slice - min_blocks_per_slice AS FLOAT) / GREATEST(NVL (min_blocks_per_slice,0)::int,1) ratio_skew_across_slices,
CAST(100*dist_slice AS FLOAT) /(SELECT COUNT(DISTINCT slice) FROM stv_slices) pct_slices_populated
FROM svv_table_info ti
JOIN (SELECT tbl, MIN(c) min_blocks_per_slice, MAX(c) max_blocks_per_slice, COUNT(DISTINCT slice) dist_slice
FROM (SELECT b.tbl, b.slice, COUNT(*) AS c
FROM STV_BLOCKLIST b
GROUP BY b.tbl, b.slice)
WHERE tbl IN (SELECT table_id FROM svv_table_info)
GROUP BY tbl) iq ON iq.tbl = ti.table_id;
This course covers the Architecture of Redshift, Columnar vs Row oriented databases, Introduce you to the AWS VPC, IAM role, and S3 bucket creation. You can master the SQL with best practices and learn a few admin activities which help to build an effective data warehouse. This course introduces compression/encoding techniques. You can learn to implement Workload management and monitor and tune long-running queries.
I always noticed most of the data engineers are clueless about how data is retrieved from the database. Writing an optimized query is a must when dealing with big data, understanding the architecture and the movement of the data is very important to write the best query.
Without prior knowledge on SQL, you can master the SQL and become a pro with this short 2 Hour tutorial.