-
Notifications
You must be signed in to change notification settings - Fork 388
More dbt small changes #4574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
koletzilla
wants to merge
4
commits into
main
Choose a base branch
from
dbt-clickhouse/documentation-updates
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
More dbt small changes #4574
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
f974351
Improve concepts explanation. Explain better table vs model configura…
koletzilla 5039b6b
Reorg some specific configs to specific models
koletzilla bad1805
Fix link
koletzilla 580c59d
sharding_key is already moved to the correct section
koletzilla File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -131,23 +131,23 @@ | |
|
||
## General information about features {#general-information-about-features} | ||
|
||
### General table configurations {#general-table-configurations} | ||
### General model configurations {#general-model-configurations} | ||
|
||
The following table shows configurations shared by some of the available materializations. For in-depth information about general dbt model configurations, see the [dbt documentation](https://docs.getdbt.com/category/general-configs): | ||
|
||
| Option | Description | Default if any | | ||
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | | ||
| engine | The table engine (type of table) to use when creating tables | `MergeTree()` | | ||
| 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()` | | ||
| 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. | | | ||
| 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()`) | | ||
| primary_key | Like order_by, a ClickHouse primary key expression. If not specified, ClickHouse will use the order by expression as the primary key | | | ||
| unique_key | A tuple of column names that uniquely identify rows. Used with incremental models for updates. | | | ||
| settings | A map/dictionary of "TABLE" settings to be used to DDL statements like 'CREATE TABLE' with this model | | | ||
| query_settings | A map/dictionary of ClickHouse user level settings to be used with `INSERT` or `DELETE` statements in conjunction with this model | | | ||
| 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. | | | ||
| indexes | A list of [data skipping indexes to create](/optimize/skipping-indexes). Check below for more information. | | | ||
| 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`. | | | ||
| indexes | A list of [data skipping indexes](/optimize/skipping-indexes) to create. See [About data skipping indexes](#data-skipping-indexes) for details. | | | ||
| 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`. | | | ||
Comment on lines
+147
to
+148
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @morsapaes sorry, I changed these lines with your suggestions in #4562 (review) and I didn't commit them 🤦 |
||
| definer | If `sql_security` was set to `definer`, you have to specify any existing user or `CURRENT_USER` in the `definer` clause. | | | ||
| projections | A list of [projections](/data-modeling/projections) to be created. Check [About projections](#projections) for details. | | | ||
| projections | A list of [projections](/data-modeling/projections) to be created. Check [About projections](#projections) for details. | | | ||
|
||
#### About data skipping indexes {#data-skipping-indexes} | ||
|
||
|
@@ -191,6 +191,8 @@ | |
| EmbeddedRocksDB | https://clickhouse.com/docs/en/engines/table-engines/integrations/embedded-rocksdb | | ||
| Hive | https://clickhouse.com/docs/en/engines/table-engines/integrations/hive | | ||
|
||
**Note**: For materialized views, all *MergeTree engines are supported. | ||
|
||
### Experimental supported table engines {#experimental-supported-table-engines} | ||
|
||
| Type | Details | | ||
|
@@ -341,7 +343,7 @@ | |
) }} | ||
``` | ||
|
||
#### Configurations {#configurations} | ||
#### Configurations {#incremental-configurations} | ||
Configurations that are specific for this materialization type are listed below: | ||
|
||
| Option | Description | Required? | | ||
|
@@ -599,6 +601,13 @@ | |
ENGINE = Distributed ('cluster', 'db', 'table_local', cityHash64(id)); | ||
``` | ||
|
||
#### Configurations {#distributed-table-configurations} | ||
Configurations that are specific for this materialization type are listed below: | ||
|
||
| Option | Description | Default if any | | ||
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | | ||
| 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()`) | | ||
|
||
### materialization: distributed_incremental (experimental) {#materialization-distributed-incremental} | ||
|
||
Incremental model based on the same idea as distributed table, the main difficulty is to process all incremental | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@morsapaes I have been doing some changes related to the reorganization of the settings per each materialization:
unique_key
andsharding_key
model
, not to atable
.What do you think?