You need to transform streaming data arriving in JSON with nested fields into a star schema in Redshift. Which approach best maintains referential integrity for dimension tables and prevents duplicate dimension keys?

Answer

Use a deterministic surrogate key strategy (e.g., hash of natural key) and maintain dimension tables via upsert/merge logic before loading facts

Explanation

Deterministic keys plus merge logic avoids multiple dimension rows for the same entity. Loading facts after dimension updates preserves referential integrity in the star schema.

Last reviewed: October 2026

Reviewed by FirstInTest Editorial Team

Report an error
QuestionBack to list