distribution is a child of
derived_table is a child of
a column from the
derived table sql
distribution allows you to specify the column from a persistent derived table on which to apply a distribution key. Currently,
distribution only works with Redshift and Aster databases. Traditional SQL dialects (such as MySQL and Postgres) should use
Generally speaking, a distribution key should be applied to the column that will be acting as a foreign key (i.e. the column you’ll use to join your derived table to others). More information can be found in the Redshift documentation and Aster documentation.
Create a customer_order_facts derived table with a distribution key on customer_id: