You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| engine | The table engine (type of table) to use when creating tables | Optional (default: `MergeTree()`) |
93
-
| order_by | A tuple of column names or arbitrary expressions. This allows you to create a small sparse index that helps find data faster. | Optional (default: `tuple()`) |
94
-
| partition_by | A partition is a logical combination of records in a table by a specified criterion. The partition key can be any expression from the table columns. | Optional |
95
-
| sharding_key | Sharding key determines the destination server when inserting into distributed engine table. The sharding key can be random or as an output of a hash function | Optional (default: `rand()`) |
96
-
| primary_key | Like order_by, a ClickHouse primary key expression. If not specified, ClickHouse will use the order by expression as the primary key |
97
-
| unique_key | A tuple of column names that uniquely identify rows. Used with incremental models for updates. | Optional |
98
-
| inserts_only | If set to True for an incremental model, incremental updates will be inserted directly to the target table without creating intermediate table. It has been deprecated in favor of the `append` incremental `strategy`, which operates in the same way | Optional |
99
-
| incremental_strategy | Incremental model update strategy of `delete+insert` or `append`. See the following Incremental Model Strategies | Optional (default: `default`) |
100
-
| incremental_predicates | Additional conditions to be applied to the incremental materialization (only applied to `delete+insert` strategy |
| engine | The table engine (type of table) to use when creating tables |`MergeTree()`|
94
+
| order_by | A tuple of column names or arbitrary expressions. This allows you to create a small sparse index that helps find data faster. |`tuple()`|
95
+
| partition_by | A partition is a logical combination of records in a table by a specified criterion. The partition key can be any expression from the table columns. ||
96
+
| sharding_key | Sharding key determines the destination server when inserting into distributed engine table. The sharding key can be random or as an output of a hash function |`rand()`) |
97
+
| primary_key | Like order_by, a ClickHouse primary key expression. If not specified, ClickHouse will use the order by expression as the primary key ||
98
+
| unique_key | A tuple of column names that uniquely identify rows. Used with incremental models for updates. ||
99
+
| inserts_only | If set to True for an incremental model, incremental updates will be inserted directly to the target table without creating intermediate table. It has been deprecated in favor of the `append` incremental `strategy`, which operates in the same way ||
100
+
| incremental_strategy | Incremental model update strategy of `delete+insert` or `append`. See the following Incremental Model Strategies |`default`|
101
+
| incremental_predicates | Additional conditions to be applied to the incremental materialization (only applied to `delete+insert` strategy ||
102
+
| settings | A map/dictionary of "TABLE" settings to be used to DDL statements like 'CREATE TABLE' with this model ||
103
+
| query_settings | A map/dictionary of ClickHouse user level settings to be used with `INSERT` or `DELETE` statements in conjunction with this model ||
104
+
105
+
## A Note on Model Settings
106
+
ClickHouse has several types/levels of "settings". In the model configuration above, two types of these are configurable. `settings` means the `SETTINGS`
107
+
clause used in `CREATE TABLE/VIEW` types of DDL statements, so this is generally settings that are specific to the specific ClickHouse table engine. The new
108
+
`query_settings` is use to add a `SETTINGS` clause to the `INSERT` and `DELETE` queries used for model materialization (including incremental materializations).
109
+
There are hundreds of ClickHouse settings, and it's not always clear which is a "table" setting and which is a "user" setting (although the latter are generally
110
+
available in the `system.settings` table.) In general the defaults are recommended, and any use of these properties should be carefully researched and tested.
111
+
101
112
## ClickHouse Cluster
102
113
103
114
`cluster` setting in profile enables dbt-clickhouse to run against a ClickHouse cluster.
0 commit comments