As of Looker 3.36, when users of Amazon Redshift create a persistent derived table, the Redshift distribution style will default to ALL instead of EVEN.
Description
Amazon Redshift allows database rows to be distributed in one of 3 ways:
All Distribution: All rows are fully copied to each node.
Even Distribution: Rows are distributed to different nodes in a round-robin fashion.
Key Distribution: Rows are distributed to different nodes based on unique values within a particular column.
Before 3.42, Looker defaulted to EVEN distribution, but now defaults to ALL if you do not specify a style using the distribution_style
parameter, or the distribution
parameter.
Going Back to an EVEN Distribution
If you would like to go back to using an EVEN distribution on a derived table, you can do so by using the distribution_style
parameter as follows:
- view: customer_order_facts
derived_table:
sql: |
SELECT
customer_id,
COUNT(*) AS lifetime_orders
FROM
order
persist_for: 24 hours
distribution_style: EVEN