Introductie tot Redshift
Jason Myers
Principal Architect
Leader node
Compute node

-- Selecting the substr, starting at
-- position 11 of 'chocolate chip'
SELECT SUBSTR('chocolate chip', 11);
chip
SUBSTRINGSUBSTR geeft fouten op tabelkolommen-- Selecting the substr from position 1
-- of the column named field on table
SELECT SUBSTR(field, 1) FROM table;
ERROR: SUBSTR() function is not
supported (Hint: use SUBSTRING
instead)
SELECT host,
-- Calculate the percentage of used space
-- using the used minus tossed or ready to be reclaimed
-- divided by the capacity
(used - tossed) / capacity * 100 as percent_used
FROM STV_PARTITIONS;
host | percent_used
======+==============
0 | 24.9
1 | 24.8
SELECT table_A.columnX,
table_B.columnY,
FROM table_A
INNER JOIN table_B
-- predicate
ON table_B.foreign_key = table_A.primary_key
-- predicate
WHERE table_B.columnZ = 'value';


MetaData-catalogus
Query-engine
Opslag
AWS Glue Data Catalog
AWS S3-bucket

Introductie tot Redshift