Redshift options

Redshift specific options can be applied to tables using the redshift() configuration statement.

Distributing data

You can configure how Redshift distributes data in your cluster by configuring the distStyle and distKey properties.

--js type("table");
--js redshift({ distKey: "user_id", distStyle: "even" });
select user_id from ...

Setting these properties will generate the correct table creation statement to run in Redshift, for example:

create table "dataform"."example"
distkey(user_id)
diststyle even
as select user_id from ...

Sorting data

You can also configure how Redshift sorts data in your tables with the sortKeys and sortStyle properties.

--js redshift({ sortKeys: ["ts"], sortStyle: "compound" });
select 1 as ts