diff --git a/contributing/content-style-guide.md b/contributing/content-style-guide.md index 204c5c854f4..688a6d21175 100644 --- a/contributing/content-style-guide.md +++ b/contributing/content-style-guide.md @@ -495,6 +495,14 @@ dbt officially provides two command line tools for running dbt commands: - [dbt Cloud CLI](/docs/cloud/cloud-cli-installation) — This tool allows you to develop locally and execute dbt commands against your dbt Cloud development environment from your local command line. - [dbt Core](https://github.com/dbt-labs/dbt-core) — This open-source tool is designed for local installation, enabling you to use dbt Core on the command line and communicate with databases through adapters. +Here are some examples of what to use and what to avoid:
+ +✅ Set up in the dbt Cloud CLI or dbt Core
+✅ Set up in the dbt Cloud CLI or dbt Core CLI
+ +❌ Set up via dbt CLI
+❌ Set up in dbt Cloud, **or** via the CLI
+ ### Terms to use or avoid Use industry-specific terms and research new/improved terminology. Also, refer to the Inclusive Language section of this style guide for inclusive and accessible language and style. diff --git a/website/docs/docs/cloud/secure/ip-restrictions.md b/website/docs/docs/cloud/secure/ip-restrictions.md index 093d2a1c876..034b3a6c144 100644 --- a/website/docs/docs/cloud/secure/ip-restrictions.md +++ b/website/docs/docs/cloud/secure/ip-restrictions.md @@ -36,7 +36,7 @@ To add an IP to the allowlist, from the **IP Restrictions** page: 4. Select **Allow** 5. Add the ranges in the CIDR notation - For example, 1.1.1.1/8 - - You cannot add multiple ranges in the same rule. Instead, create a rule per CIDR range. + - You can add multiple ranges in the same rule. 6. Click **Save** Note that simply adding the IP Ranges will not enforce IP restrictions. For more information, see the section “Enabling Restrictions.” diff --git a/website/docs/reference/resource-configs/enabled.md b/website/docs/reference/resource-configs/enabled.md index 52045503088..d146f229494 100644 --- a/website/docs/reference/resource-configs/enabled.md +++ b/website/docs/reference/resource-configs/enabled.md @@ -261,20 +261,26 @@ Support for disabling semantic models has been added in dbt Core v1.7 - - -```yml -semantic_models: - - name: semantic_people - model: ref('people') - config: - enabled: false + +```yaml +semantic-models: + [](/reference/resource-configs/resource-path): + [+](/reference/resource-configs/plus-prefix)enabled: true | false ``` -The `enabled` configuration can be nested under the `config` key. + + +```yaml +semantic_models: + - name: [] + [config](/reference/resource-properties/config): + enabled: true | false +``` + + @@ -283,7 +289,7 @@ The `enabled` configuration can be nested under the `config` key. ## Definition -An optional configuration for disabling models, seeds, snapshots, tests, and semantic models. +An optional configuration for enabling or disabling a resource. * Default: true diff --git a/website/docs/reference/resource-configs/group.md b/website/docs/reference/resource-configs/group.md index 7515d8c5789..bce2a72136e 100644 --- a/website/docs/reference/resource-configs/group.md +++ b/website/docs/reference/resource-configs/group.md @@ -29,8 +29,6 @@ Support for grouping models was added in dbt Core v1.5 - - ```yml @@ -68,6 +66,8 @@ select ... + + @@ -80,8 +80,6 @@ Support for grouping seeds was added in dbt Core v1.5 - - ```yml @@ -102,6 +100,8 @@ seeds: + + @@ -115,8 +115,6 @@ Support for grouping snapshots was added in dbt Core v1.5 - - ```yml @@ -143,6 +141,8 @@ select ... + + @@ -156,8 +156,6 @@ Support for grouping tests was added in dbt Core v1.5 - - ```yml @@ -210,6 +208,8 @@ select ... + + @@ -239,8 +239,6 @@ Support for grouping metrics was added in dbt Core v1.5 - - ```yaml @@ -264,8 +262,11 @@ metrics: + + + @@ -276,12 +277,12 @@ Support for grouping semantic models has been added in dbt Core v1.7. - + -```yml +```yaml semantic_models: - - name: model_name - group: finance + - name: + group: ``` @@ -289,16 +290,14 @@ semantic_models: -```yml -semantic_models: +```yaml +semantic-models: [](resource-path): - +group: finance + [+](plus-prefix)group: ``` -The `group` configuration can be nested under the `config` key. - @@ -306,7 +305,7 @@ The `group` configuration can be nested under the `config` key. ## Definition -An optional configuration for grouping models, analysis, snapshots, tests, and metrics. When a resource is grouped, dbt will allow it to reference private models within the same group. +An optional configuration for assigning a group to a resource. When a resource is grouped, dbt will allow it to reference private models within the same group. For more details on reference access between resources in groups, check out [model access](/docs/collaborate/govern/model-access#groups). diff --git a/website/docs/reference/resource-configs/meta.md b/website/docs/reference/resource-configs/meta.md index 65c8b5f908e..9ccf2cc60dc 100644 --- a/website/docs/reference/resource-configs/meta.md +++ b/website/docs/reference/resource-configs/meta.md @@ -184,20 +184,20 @@ Support for grouping semantic models was added in dbt Core v1.7 - + ```yml semantic_models: - - name: semantic_people - model: ref('people') + - name: semantic_model_name config: meta: {} ``` -The `meta` configuration can be nusted under the `config` key. +The `meta` config can also be defined under the `semantic-models` config block in `dbt_project.yml`. See [configs and properties](/reference/configs-and-properties) for details. + @@ -207,7 +207,7 @@ The `meta` configuration can be nusted under the `config` key. ## Definition The `meta` field can be used to set metadata for a resource. This metadata is compiled into the `manifest.json` file generated by dbt, and is viewable in the auto-generated documentation. -Depending on the resource you're configuring, `meta` may be available within the `config` property, or as a top-level key. (For backwards compatibility, `meta` is always supported as a top-level key, though without the capabilities of config inheritance.) +Depending on the resource you're configuring, `meta` may be available within the `config` property, and/or as a top-level key. (For backwards compatibility, `meta` is often (but not always) supported as a top-level key, though without the capabilities of config inheritance.) ## Examples diff --git a/website/docs/reference/resource-configs/pre-hook-post-hook.md b/website/docs/reference/resource-configs/pre-hook-post-hook.md index 297d6975d6f..de652bff088 100644 --- a/website/docs/reference/resource-configs/pre-hook-post-hook.md +++ b/website/docs/reference/resource-configs/pre-hook-post-hook.md @@ -175,13 +175,17 @@ If multiple instances of any hooks are defined, dbt will run each hook using the ### Transaction behavior -If you're using an adapter that makes use of transactions (namely Postgres or Redshift), it's worth noting that by default hooks are executed inside of the same transaction as your model being created. +If you're using an adapter that uses transactions (namely Postgres or Redshift), it's worth noting that by default hooks are executed inside of the same transaction as your model being created. There may be occasions where you need to run these hooks _outside_ of a transaction, for example: -* You want to run a `VACUUM` in a `post-hook`, however this cannot be executed within a transaction ([Redshift docs](https://docs.aws.amazon.com/redshift/latest/dg/r_VACUUM_command.html#r_VACUUM_usage_notes)) -* You want to insert a record into an audit at the start of a run, and do not want that statement rolled back if the model creation fails. +* You want to run a `VACUUM` in a `post-hook`, however, this cannot be executed within a transaction ([Redshift docs](https://docs.aws.amazon.com/redshift/latest/dg/r_VACUUM_command.html#r_VACUUM_usage_notes)) +* You want to insert a record into an audit at the start of a run and do not want that statement rolled back if the model creation fails. -To achieve this, you can use one of the following syntaxes. (Note: You should NOT use this syntax if using a database where dbt does not use transactions by default, including Snowflake, BigQuery, and Spark/Databricks.) +To achieve this behavior, you can use one of the following syntaxes: + - Important note: Do not use this syntax if you are using a database where dbt does not support transactions. This includes databases like Snowflake, BigQuery, and Spark or Databricks. + + + #### Config block: use the `before_begin` and `after_commit` helper macros @@ -200,6 +204,9 @@ select ... ``` + + + #### Config block: use a dictionary @@ -224,6 +231,10 @@ select ... + + + + #### `dbt_project.yml`: Use a dictionary @@ -242,3 +253,5 @@ models: ``` + +