Skip to content

Commit

Permalink
Merge branch 'current' into mirnawong1-patch-12
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnawong1 authored Jan 26, 2024
2 parents b8e77d0 + ba1d744 commit db58080
Show file tree
Hide file tree
Showing 29 changed files with 139 additions and 111 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@ We're not limited to just passing measures through to our metrics, we can also _

```YAML
- name: food_revenue
description: The revenue from food in each order.
label: Food Revenue
type: simple
type_params:
measure: revenue
filter: |
{{ Dimension('order__is_food_order') }} = true
description: The revenue from food in each order.
label: Food Revenue
type: simple
type_params:
measure: food_revenue
```
- 📝 Now we can set up our ratio metric.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ id: 1-how-we-style-our-dbt-models
- 👥 Models should be pluralized, for example, `customers`, `orders`, `products`.
- 🔑 Each model should have a primary key.
- 🔑 The primary key of a model should be named `<object>_id`, for example, `account_id`. This makes it easier to know what `id` is being referenced in downstream joined models.
- Use underscores for naming dbt models; avoid dots.
-`models_without_dots`
-`models.with.dots`
- Most data platforms use dots to separate `database.schema.object`, so using underscores instead of dots reduces your need for [quoting](/reference/resource-properties/quoting) as well as the risk of issues in certain parts of dbt Cloud. For more background, refer to [this GitHub issue](https://github.com/dbt-labs/dbt-core/issues/3246).
- 🔑 Keys should be string data types.
- 🔑 Consistency is key! Use the same field names across models where possible. For example, a key to the `customers` table should be named `customer_id` rather than `user_id` or 'id'.
- ❌ Do not use abbreviations or aliases. Emphasize readability over brevity. For example, do not use `cust` for `customer` or `o` for `orders`.
Expand Down
3 changes: 2 additions & 1 deletion website/docs/docs/build/materializations.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ When using the `table` materialization, your model is rebuilt as a <Term id="tab
- Ephemeral models can help keep your <Term id="data-warehouse" /> clean by reducing clutter (also consider splitting your models across multiple schemas by [using custom schemas](/docs/build/custom-schemas)).
* **Cons:**
* You cannot select directly from this model.
* Operations (e.g. macros called via `dbt run-operation` cannot `ref()` ephemeral nodes)
* [Operations](/docs/build/hooks-operations#about-operations) (for example, macros called using [`dbt run-operation`](/reference/commands/run-operation) cannot `ref()` ephemeral nodes)
* Overuse of ephemeral materialization can also make queries harder to debug.
* Ephemeral materialization doesn't support [model contracts](/docs/collaborate/govern/model-contracts#where-are-contracts-supported).
* **Advice:** Use the ephemeral materialization for:
* very light-weight transformations that are early on in your DAG
* are only used in one or two downstream models, and
Expand Down
2 changes: 0 additions & 2 deletions website/docs/docs/build/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ pagination_next: "docs/build/sql-models"
pagination_prev: null
---

## Overview

dbt Core and Cloud are composed of different moving parts working harmoniously. All of them are important to what dbt does — transforming data—the 'T' in ELT. When you execute `dbt run`, you are running a model that will transform your data without that data ever leaving your warehouse.

Models are where your developers spend most of their time within a dbt environment. Models are primarily written as a `select` statement and saved as a `.sql` file. While the definition is straightforward, the complexity of the execution will vary from environment to environment. Models will be written and rewritten as needs evolve and your organization finds new ways to maximize efficiency.
Expand Down
5 changes: 4 additions & 1 deletion website/docs/docs/build/sql-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ dbt's Python capabilities are an extension of its capabilities with SQL models.
A SQL model is a `select` statement. Models are defined in `.sql` files (typically in your `models` directory):
- Each `.sql` file contains one model / `select` statement
- The model name is inherited from the filename.
- Models can be nested in subdirectories within the `models` directory
- We strongly recommend using underscores for model names, not dots. For example, use `models/my_model.sql` instead of `models/my.model.sql`.
- Models can be nested in subdirectories within the `models` directory.

Refer to [How we style our dbt models](/best-practices/how-we-style/1-how-we-style-our-dbt-models) for details on how we recommend you name your models.

When you execute the [`dbt run` command](/reference/commands/run), dbt will build this model <Term id="data-warehouse" /> by wrapping it in a `create view as` or `create table as` statement.

Expand Down
54 changes: 24 additions & 30 deletions website/docs/docs/cloud/dbt-cloud-ide/develop-in-the-cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,38 +133,32 @@ The dbt Cloud IDE makes it possible to [build and view](/docs/collaborate/build-

## Related docs

- [dbt Cloud features](/docs/cloud/about-cloud/dbt-cloud-features)
- [IDE user interface](/docs/cloud/dbt-cloud-ide/ide-user-interface)
- [How we style our dbt projects](/best-practices/how-we-style/0-how-we-style-our-dbt-projects)
- [User interface](/docs/cloud/dbt-cloud-ide/ide-user-interface)
- [Version control basics](/docs/collaborate/git/version-control-basics)
- [dbt Commands](/reference/dbt-commands)
- [dbt Cloud IDE release notes](/tags/ide)

## Related questions

<FAQ path="Git/gitignore"/> <br />

<details>
<summary>Is there a cost to using the Cloud IDE?</summary>
<div>
<div>Not at all! You can use dbt Cloud when you sign up for the <a href="https://www.getdbt.com/pricing/">Free Developer plan</a>, which comes with one developer seat. If you’d like to access more features or have more developer seats, you can upgrade your account to the Team or Enterprise plan. See <a href="https://www.getdbt.com/pricing/">dbt pricing plans</a> for more details. </div>
</div>
</details>
<details>
<summary>Can I be a contributor to dbt Cloud?</summary>
<div>
<div>Anyone can contribute to the dbt project. And whether it's a dbt package, a plugin, dbt-core, or this documentation site, contributing to the open-source code that supports the dbt ecosystem is a great way to level yourself up as a developer, and give back to the community. See <a href="https://docs.getdbt.com/community/resources/oss-expectations">Contributing</a> for details on what to expect when contributing to the dbt open source software (OSS). </div>
</div>
</details>
<details>
<summary>What is the difference between developing on the dbt Cloud IDE, the dbt Cloud CLI, and dbt Core?</summary>
<div>
<div>You can develop dbt using the web-based IDE in dbt Cloud or on the command line interface using the dbt Cloud CLI or open-source dbt Core, all of which enable you to execute dbt commands. The key distinction between the dbt Cloud CLI and dbt Core is the dbt Cloud CLI is tailored for dbt Cloud's infrastructure and integrates with all its features.<br /><br />
<span>&mdash; </span>
<b>dbt Cloud IDE:</b> <a href="https://docs.getdbt.com/docs/cloud/about-cloud/dbt-cloud-features">dbt Cloud</a> is a web-based application that allows you to develop dbt projects with the IDE, includes a purpose-built scheduler, and provides an easier way to share your dbt documentation with your team. The IDE is a faster and more reliable way to deploy your dbt models and provides a real-time editing and execution environment for your dbt project. <br /><br />
<span>&mdash; </span>
<b>dbt Cloud CLI: </b> <a href="https://docs.getdbt.com/docs/cloud/cloud-cli-installation">The dbt Cloud CLI</a> allows you to run dbt commands against your dbt Cloud development environment from your local command line or code editor. It supports cross-project ref, speedier, lower-cost builds, automatic deferral of build artifacts, and more. <br /><br />
<span>&mdash; </span>
<b>dbt Core:</b> dbt Core is an <a href="https://github.com/dbt-labs/dbt">open-sourced</a> software that’s freely available. You can build your dbt project in a code editor, and run dbt commands from the command line.
</div>
</div>
</details>
<FAQ path="Git/gitignore"/>

<detailsToggle alt_header="Is there a cost to using the Cloud IDE?">
Not at all! You can use dbt Cloud when you sign up for the <a href="https://www.getdbt.com/pricing/">Free Developer plan</a>, which comes with one developer seat. If you’d like to access more features or have more developer seats, you can upgrade your account to the Team or Enterprise plan.<br />

Refer to <a href="https://www.getdbt.com/pricing/">dbt pricing plans</a> for more details.
</detailsToggle>

<detailsToggle alt_header="Can I be a contributor to dbt Cloud?">
As a proprietary product, dbt Cloud's source code isn't available for community contributions. If you want to build something in the dbt ecosystem, we encourage you to review [this article](/community/contributing/contributing-coding) about contributing to a dbt package, a plugin, dbt-core, or this documentation site. Participation in open-source is a great way to level yourself up as a developer, and give back to the community.
</detailsToggle>

<detailsToggle alt_header="What is the difference between developing on the dbt Cloud IDE, the dbt Cloud CLI, and dbt Core?">
You can develop dbt using the web-based IDE in dbt Cloud or on the command line interface using the dbt Cloud CLI or open-source dbt Core, all of which enable you to execute dbt commands. The key distinction between the dbt Cloud CLI and dbt Core is the dbt Cloud CLI is tailored for dbt Cloud's infrastructure and integrates with all its features:

- dbt Cloud IDE: <a href="https://docs.getdbt.com/docs/cloud/about-cloud/dbt-cloud-features">dbt Cloud</a> is a web-based application that allows you to develop dbt projects with the IDE, includes a purpose-built scheduler, and provides an easier way to share your dbt documentation with your team. The IDE is a faster and more reliable way to deploy your dbt models and provides a real-time editing and execution environment for your dbt project.

- dbt Cloud CLI: <a href="https://docs.getdbt.com/docs/cloud/cloud-cli-installation">The dbt Cloud CLI</a> allows you to run dbt commands against your dbt Cloud development environment from your local command line or code editor. It supports cross-project ref, speedier, lower-cost builds, automatic deferral of build artifacts, and more.

- dbt Core: dbt Core is an <a href="https://github.com/dbt-labs/dbt">open-sourced</a> software that’s freely available. You can build your dbt project in a code editor, and run dbt commands from the command line

</detailsToggle>
15 changes: 4 additions & 11 deletions website/docs/docs/cloud/manage-access/about-access.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,10 @@ Cloud administrators can manage access to dbt Cloud resources via identity
management software like Azure AD, Okta, or GSuite. See _SSO Mappings_ below for
more information.

You can view the groups in your account or create new groups from the **Team > Groups**
page in your Account Settings.

<Lightbox
src="/img/docs/dbt-cloud/dbt-cloud-enterprise/access-control/group-list.png"
title="Viewing a list of groups in the Account Settings page."
/>
You can view the groups in your account or create new groups from the **Groups & Licenses**
page in your Account Settings. <br />

<Lightbox src="/img/docs/dbt-cloud/dbt-cloud-enterprise/access-control/group-list-2.png" title="Viewing a list of groups in the Account Settings page." />

### SSO mappings

Expand Down Expand Up @@ -115,10 +111,7 @@ In the following example, the _dbt Cloud Owners_ group is configured with the
**Account Admin** permission set on _All Projects_ and the **Job Admin** permission
set on the _Internal Analytics_ project.

<Lightbox
src="/img/docs/dbt-cloud/dbt-cloud-enterprise/access-control/group-permissions.png"
title="Configuring permissions for the Admins group"
/>
<Lightbox src="/img/docs/dbt-cloud/dbt-cloud-enterprise/access-control/group-permissions.png" width="65%" title="Configuring permissions for the Admins group"/>


### Manual assignment
Expand Down
27 changes: 14 additions & 13 deletions website/docs/docs/cloud/manage-access/cloud-seats-and-users.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,14 @@ The following tabs detail steps on how to modify your user license count:

If you're on an Enterprise plan and have the correct [permissions](/docs/cloud/manage-access/enterprise-permissions), you can add or remove licenses by adjusting your user seat count. Note, an IT license does not count toward seat usage.

- To remove a user, go to **Account Settings**, select **Users** under **Teams**. Select the user you want to remove, click **Edit**, and then **Delete**. This action cannot be undone. However, you can re-invite the user with the same info if you deleted the user in error.<br />
- To remove a user, go to **Account Settings** and select **Users**.
- Select the user you want to remove, click **Edit**, and then **Delete**.
- This action cannot be undone. However, you can re-invite the user with the same info if you deleted the user in error.<br />

- To add a user, go to **Account Settings**, select **Users** under **Teams**. Select [**Invite Users**](docs/cloud/manage-access/invite-users). For fine-grained permission configuration, refer to [Role based access control](/docs/cloud/manage-access/enterprise-permissions).
- To add a user, go to **Account Settings** and select **Users**.
- Click the [**Invite Users**](/docs/cloud/manage-access/invite-users) button.
- For fine-grained permission configuration, refer to [Role based access control](/docs/cloud/manage-access/enterprise-permissions).

<Lightbox src="/img/docs/dbt-cloud/faq-account-settings-enterprise.jpg" width="85%" title="Navigate to Account Settings --> Users to add or remove users" />

</TabItem>

Expand All @@ -72,14 +75,13 @@ To add a user in dbt Cloud, you must be an account owner or have admin privilege

1. From dbt Cloud, click the gear icon at the top right and select **Account Settings**.

<Lightbox src="/img/docs/dbt-cloud/Navigate To Account Settings.png" width="85%" title="Navigate to Account Settings" />
<Lightbox src="/img/docs/dbt-cloud/Navigate To Account Settings.png" width="75%" title="Navigate to Account Settings" />

2. In **Account Settings**, select **Billing**.
3. Enter the number of developer seats you want and make sure you fill in all the payment details, including the **Billing Address** section. Leaving these blank won't allow you to save your changes.
4. Press **Update Payment Information** to save your changes.

4. Press **Update Payment Information** to save your changes.

<Lightbox src="/img/docs/dbt-cloud/faq-account-settings-billing.jpg" width="85%" title="Navigate to Account Settings -> Billing to modify billing seat count" />
<Lightbox src="/img/docs/dbt-cloud/faq-account-settings-billing.jpg" width="75%" title="Navigate to Account Settings -> Billing to modify billing seat count" />


Now that you've updated your billing, you can now [invite users](/docs/cloud/manage-access/invite-users) to join your dbt Cloud account:
Expand All @@ -95,11 +97,11 @@ To delete a user in dbt Cloud, you must be an account owner or have admin privil

<Lightbox src="/img/docs/dbt-cloud/Navigate To Account Settings.png" width="85%" title="Navigate to Account Settings" />

2. In **Account Settings**, select **Users** under **Teams**.
2. In **Account Settings** and select **Users**.
3. Select the user you want to delete, then click **Edit**.
4. Click **Delete** in the bottom left. Click **Confirm Delete** to immediately delete the user without additional password prompts. This action cannot be undone. However, you can re-invite the user with the same information if the deletion was made in error.

<Lightbox src="/img/docs/dbt-cloud/delete_user_20221023.gif" width="85%" title="Deleting a user" />
<Lightbox src="/img/docs/dbt-cloud/delete_user_20221023.gif" width="75%" title="Deleting a user" />


If you are on a **Teams** plan and you're deleting users to reduce the number of billable seats, follow these steps to lower the license count to avoid being overcharged:
Expand All @@ -108,7 +110,7 @@ If you are on a **Teams** plan and you're deleting users to reduce the number of
2. Enter the number of developer seats you want and make sure you fill in all the payment details, including the **Billing Address** section. If you leave any field blank, you won't be able to save your changes.
3. Click **Update Payment Information** to save your changes.

<Lightbox src="/img/docs/dbt-cloud/faq-account-settings-billing.jpg" width="85%" title="The **Billing** page in your **Account Settings**" />
<Lightbox src="/img/docs/dbt-cloud/faq-account-settings-billing.jpg" width="75%" title="The Billing** page in your **Account Settings" />

Great work! After completing these steps, your dbt Cloud user count and billing count should now be the same.

Expand Down Expand Up @@ -136,7 +138,7 @@ to allocate for the user. If your account does not have an available license to
allocate, you will need to add more licenses to your plan to complete the license
change.

<Lightbox src="/img/docs/dbt-cloud/access-control/license-manual.png" title="Manually assigning licenses"/>
<Lightbox src="/img/docs/dbt-cloud/access-control/license-manual.png" width="55%" title="Manually assigning licenses"/>

### Mapped configuration

Expand All @@ -154,8 +156,7 @@ license. To assign Read-Only licenses to certain groups of users, create a new
License Mapping for the Read-Only license type and include a comma separated
list of IdP group names that should receive a Read-Only license at sign-in time.

<Lightbox src="/img/docs/dbt-cloud/access-control/license-mapping.png"
title="Configuring IdP group license mapping"/>
<Lightbox src="/img/docs/dbt-cloud/access-control/license-mapping.png" width="65%" title="Configuring IdP group license mapping"/>

Usage notes:
- If a user's IdP groups match both a Developer and Read-Only license type
Expand Down
14 changes: 7 additions & 7 deletions website/docs/docs/cloud/manage-access/enterprise-permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ The user's [license](/docs/cloud/manage-access/seats-and-users) type always over

Role-Based Access Control (RBAC) is helpful for automatically assigning permissions to dbt admins based on their SSO provider group associations.

1. Click the gear icon to the top right and select **Account Settings**. From the **Team** section, click **Groups**
1. Click the gear icon to the top right and select **Account Settings**. Click **Groups & Licenses**

<Lightbox src="/img/docs/dbt-cloud/Select-Groups-RBAC.png" title="Navigate to Groups"/>
<Lightbox src="/img/docs/dbt-cloud/Select-Groups-RBAC.png" width="70%" title="Navigate to Groups"/>

1. Select an existing group or create a new group to add RBAC. Name the group (this can be any name you like, but it's recommended to keep it consistent with the SSO groups). If you have configured SSO with SAML 2.0, you may have to use the GroupID instead of the name of the group.
2. Configure the SSO provider groups you want to add RBAC by clicking **Add** in the **SSO** section. These fields are case-sensitive and must match the source group formatting.
3. Configure the permissions for users within those groups by clicking **Add** in the **Access** section of the window.
<Lightbox src="/img/docs/dbt-cloud/Configure-SSO-Access.png" title="Configure SSO groups and Access permissions"/>
2. Select an existing group or create a new group to add RBAC. Name the group (this can be any name you like, but it's recommended to keep it consistent with the SSO groups). If you have configured SSO with SAML 2.0, you may have to use the GroupID instead of the name of the group.
3. Configure the SSO provider groups you want to add RBAC by clicking **Add** in the **SSO** section. These fields are case-sensitive and must match the source group formatting.
4. Configure the permissions for users within those groups by clicking **Add** in the **Access** section of the window.
<Lightbox src="/img/docs/dbt-cloud/Configure-SSO-Access.png" width="45%" title="Configure SSO groups and Access permissions"/>

4. When you've completed your configurations, click **Save**. Users will begin to populate the group automatically once they have signed in to dbt Cloud with their SSO credentials.
5. When you've completed your configurations, click **Save**. Users will begin to populate the group automatically once they have signed in to dbt Cloud with their SSO credentials.
Loading

0 comments on commit db58080

Please sign in to comment.