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
Copy file name to clipboardExpand all lines: docs/integrations/data-ingestion/etl-tools/dbt/features-and-configurations.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -131,7 +131,9 @@ dbt relies on a read-after-insert consistency model. This is not compatible with
131
131
132
132
## General information about features {#general-information-about-features}
133
133
134
-
### General table configurations {#general-table-configurations}
134
+
### General model configurations {#general-model-configurations}
135
+
136
+
The following table shows configurations shared by some of the available materializations. For in-depth information about each configuration, see the [dbt documentation](https://docs.getdbt.com/category/general-configs):
@@ -140,12 +142,11 @@ dbt relies on a read-after-insert consistency model. This is not compatible with
140
142
| 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. ||
141
143
| 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()`) |
142
144
| primary_key | Like order_by, a ClickHouse primary key expression. If not specified, ClickHouse will use the order by expression as the primary key ||
143
-
| unique_key | A tuple of column names that uniquely identify rows. Used with incremental models for updates. ||
144
145
| settings | A map/dictionary of "TABLE" settings to be used to DDL statements like 'CREATE TABLE' with this model ||
145
146
| query_settings | A map/dictionary of ClickHouse user level settings to be used with `INSERT` or `DELETE` statements in conjunction with this model ||
146
147
| ttl | A TTL expression to be used with the table. The TTL expression is a string that can be used to specify the TTL for the table. ||
147
-
| indexes | A list of [data skipping indexes to create](/optimize/skipping-indexes). Check below for more information. ||
148
-
| sql_security |Allow you to specify which ClickHouse user to use when executing the view's underlying query.`SQL SECURITY`[has two legal values](/sql-reference/statements/create/view#sql_security): `definer``invoker`. ||
148
+
| indexes |A list of [data skipping indexes](/optimize/skipping-indexes) to create. See [About data skipping indexes](#data-skipping-indexes) for details. ||
149
+
| sql_security |The ClickHouse user to use when executing the view's underlying query.[Accepted values]((/sql-reference/statements/create/view#sql_security)): `definer`,`invoker`. ||
149
150
| definer | If `sql_security` was set to `definer`, you have to specify any existing user or `CURRENT_USER` in the `definer` clause. ||
150
151
| projections | A list of [projections](/data-modeling/projections) to be created. Check [About projections](#projections) for details. ||
151
152
@@ -191,6 +192,8 @@ You can add [projections](/data-modeling/projections) to `table` and `distribute
Copy file name to clipboardExpand all lines: docs/integrations/data-ingestion/etl-tools/dbt/index.md
+8-16Lines changed: 8 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,31 +48,23 @@ All features up to dbt-core 1.9 are supported. We will soon add the features add
48
48
49
49
This adapter is still not available for use inside [dbt Cloud](https://docs.getdbt.com/docs/dbt-cloud/cloud-overview), but we expect to make it available soon. Please reach out to support to get more information on this.
50
50
51
-
## Concepts {#concepts}
51
+
## dbt concepts and supported materializations {#concepts-and-supported-materializations}
52
52
53
53
dbt introduces the concept of a model. This is defined as a SQL statement, potentially joining many tables. A model can be "materialized" in a number of ways. A materialization represents a build strategy for the model's select query. The code behind a materialization is boilerplate SQL that wraps your SELECT query in a statement in order to create a new or update an existing relation.
54
54
55
-
dbt provides 4 types of materialization:
55
+
dbt provides 5 types of materialization. All of them are supported by `dbt-clickhouse`:
56
56
57
-
***view** (default): The model is built as a view in the database.
58
-
***table**: The model is built as a table in the database.
59
-
***ephemeral**: The model is not directly built in the database but is instead pulled into dependent models as common table expressions.
57
+
***view** (default): The model is built as a view in the database. At ClickHouse this is built as a [view](/sql-reference/statements/create/view).
58
+
***table**: The model is built as a table in the database. At ClickHouse this is built as a [table](/sql-reference/statements/create/table).
59
+
***ephemeral**: The model is not directly built in the database but is instead pulled into dependent models as CTEs (Common Table Expressions).
60
60
***incremental**: The model is initially materialized as a table, and in subsequent runs, dbt inserts new rows and updates changed rows in the table.
61
+
***materialized view**: The model is built as a materialized view in the database. At ClickHouse this is built as a [materialized view](/sql-reference/statements/create/view#materialized-view).
61
62
62
63
Additional syntax and clauses define how these models should be updated if their underlying data changes. dbt generally recommends starting with the view materialization until performance becomes a concern. The table materialization provides a query time performance improvement by capturing the results of the model's query as a table at the expense of increased storage. The incremental approach builds on this further to allow subsequent updates to the underlying data to be captured in the target table.
63
64
64
-
The[ current adapter](https://github.com/silentsokolov/dbt-clickhouse) for ClickHouse supports also support **materialized view**, **dictionary**, **distributed table** and **distributed incremental** materializations. The adapter also supports dbt[snapshots](https://docs.getdbt.com/docs/building-a-dbt-project/snapshots#check-strategy) and [seeds](https://docs.getdbt.com/docs/building-a-dbt-project/seeds).
65
+
The[ current adapter](https://github.com/silentsokolov/dbt-clickhouse) for ClickHouse supports also support **dictionary**, **distributed table** and **distributed incremental** materializations. The adapter also supports dbt[snapshots](https://docs.getdbt.com/docs/building-a-dbt-project/snapshots#check-strategy) and [seeds](https://docs.getdbt.com/docs/building-a-dbt-project/seeds).
65
66
66
-
### Details about supported materializations {#details-about-supported-materializations}
| view materialization | YES | Creates a [view](https://clickhouse.com/docs/en/sql-reference/table-functions/view/). |
71
-
| table materialization | YES | Creates a [table](https://clickhouse.com/docs/en/operations/system-tables/tables/). See below for the list of supported engines. |
72
-
| incremental materialization | YES | Creates a table if it doesn't exist, and then writes only updates to it. |
73
-
| ephemeral materialized | YES | Creates a ephemeral/CTE materialization. This does model is internal to dbt and does not create any database objects |
74
-
75
-
The following are [experimental features](https://clickhouse.com/docs/en/beta-and-experimental-features) in ClickHouse:
67
+
The following are [experimental features](https://clickhouse.com/docs/en/beta-and-experimental-features) in `dbt-clickhouse`:
0 commit comments