In addition to the configuration parameters that apply to all database adapters, there are certain configuration options that apply only to specific databases.
Using sortkey and distkey
Tables in Amazon Redshift have two powerful optimizations to improve query performance: distkeys and sortkeys. Supplying these values as model-level configurations apply the corresponding settings in the generated
CREATE TABLE DDL. Note that these settings will have no effect for models set to
distcan have a setting of
even, or the name of a key.
sortaccepts a list of sort keys, for example:
['timestamp', 'userid']. dbt will build the sort key in the same order the fields are supplied.
sort_typecan have a setting of
compound. if no setting is specified, sort_type defaults to
For more information on distkeys and sortkeys, view Amazon's docs.