Skip to content

Commit

Permalink
Merge branch 'current' into mwong-env-var-cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnawong1 authored Jan 25, 2024
2 parents 244baf7 + 694cfae commit 7d8929a
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 46 deletions.
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
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>
4 changes: 2 additions & 2 deletions website/docs/docs/cloud/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ If your account is scheduled for migration, you will see a banner indicating you

3. **IDE sessions** &mdash; Any uncommitted changes in the IDE might be lost during the migration process. dbt Labs _strongly_ encourages you to commit all changes in the IDE before your scheduled migration time.
4. **User invitations** &mdash; Any pending user invitations will be invalidated during the migration. You can resend the invitations once the migration is complete.
5. **Git integrations** &mdash; Integrations with GitHub, GitLab, and Azure DevOps will need to be manually updated. dbt Labs will not be migrating any accounts using these integrations at this time. If you're using one of these integrations and your account is scheduled for migration, please contact support and we will delay your migration.
5. **Git integrations** &mdash; Native integrations with [GitLab](/docs/cloud/git/connect-gitlab#for-the-dbt-cloud-enterprise-tier) and [Azure DevOps](/docs/cloud/git/connect-azure-devops) will need to be manually updated. dbt Labs will not be migrating any accounts using these integrations at this time. If you're using one of these integrations and your account is scheduled for migration, please contact support and we will delay your migration.
6. **SSO integrations** &mdash; Integrations with SSO identity providers (IdPs) will need to be manually updated. dbt Labs will not be migrating any accounts using SSO at this time. If you're using one of these integrations and your account is scheduled for migration, please contact support and we will delay your migration.

## Post-migration
Expand All @@ -42,4 +42,4 @@ After migration, if you completed all the [Pre-migration checklist](#pre-migrati

You have the option to log in to dbt Cloud at a different URL:
* If you were previously logging in at `cloud.getdbt.com`, you should instead plan to login at `us1.dbt.com`. The original URL will still work, but you’ll have to click through to be redirected upon login.
* You may also log in directly with your account’s unique [access URL](https://next.docs.getdbt.com/docs/cloud/about-cloud/access-regions-ip-addresses#accessing-your-account).
* You may also log in directly with your account’s unique [access URL](https://next.docs.getdbt.com/docs/cloud/about-cloud/access-regions-ip-addresses#accessing-your-account).
4 changes: 3 additions & 1 deletion website/docs/faqs/Accounts/transfer-account.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ You can transfer your dbt Cloud [access control](/docs/cloud/manage-access/about

| Account plan| Steps |
| ------ | ---------- |
| **Developer** | You can transfer ownership by changing the email directly on your dbt Cloud profile page, which you can access using this URL when you replace `YOUR_ACCESS_URL` with the [appropriate Access URL](/docs/cloud/about-cloud/regions-ip-addresses) for your region and plan: `https://YOUR_ACCESS_URL/settings/profile` |
| **Developer** | You can transfer ownership by changing the email directly on your dbt Cloud profile page, which you can access using this URL when you replace `YOUR_ACCESS_URL` with the [appropriate Access URL](/docs/cloud/about-cloud/regions-ip-addresses) for your region and plan: `https://YOUR_ACCESS_URL/settings/profile`. Before doing this, please ensure that you unlink your GitHub profile. |
| **Team** | Existing account admins with account access can add users to, or remove users from the owner group. |
| **Enterprise** | Account admins can add users to, or remove users from a group with Account Admin permissions. |
| **If all account owners left the company** | If the account owner has left your organization, you will need to work with _your_ IT department to have incoming emails forwarded to the new account owner. Once your IT department has redirected the emails, you can request to reset the user password. Once you log in, you can change the email on the Profile page when you replace `YOUR_ACCESS_URL` with the [appropriate Access URL](/docs/cloud/about-cloud/regions-ip-addresses) for your region and plan: `https://YOUR_ACCESS_URL/settings/profile`. |
Expand All @@ -19,3 +19,5 @@ When you make any account owner and email changes:

- The new email address _must_ be verified through our email verification process.
- You can update any billing email address or [Notifications Settings](/docs/deploy/job-notifications) to reflect the new account owner changes, if applicable.
- When transferring account ownership, please ensure you [unlink](/faqs/Accounts/git-account-in-use) your GitHub account in dbt Cloud. This is because you can only have your Git account linked to one dbt Cloud user account.

24 changes: 14 additions & 10 deletions website/docs/reference/resource-properties/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ A user-defined description. Can be used to document:
- analyses, and analysis columns
- macros, and macro arguments

These descriptions are used in the documentation website rendered by dbt (see [the documentation guide](/docs/collaborate/documentation)).
These descriptions are used in the documentation website rendered by dbt (refer to [the documentation guide](/docs/collaborate/documentation) or [dbt Explorer](/docs/collaborate/explore-projects)).

Descriptions can include markdown, as well as the [`doc` jinja function](/reference/dbt-jinja-functions/doc).

Expand Down Expand Up @@ -265,7 +265,7 @@ Orders can be one of the following statuses:
| status | description |
|----------------|---------------------------------------------------------------------------|
| placed | The order has been placed but has not yet left the warehouse |
| shipped | The order has ben shipped to the customer and is currently in transit |
| shipped | The order has been shipped to the customer and is currently in transit |
| completed | The order has been received by the customer |
| returned | The order has been returned by the customer and received at the warehouse |
Expand Down Expand Up @@ -305,7 +305,13 @@ models:


### Include an image from your repo in your descriptions
To include an image from your repository in your descriptions:

This section applies to dbt Core users only. Including an image from your repository ensures your images are version-controlled.

Both dbt Cloud and dbt Core users can [include an image from the web](#include-an-image-from-the-web-in-your-descriptions), which offers dynamic content, reduced repository size, accessibility, and ease of collaboration.

To include an image in your model's `description` field:

1. Add the file in a subdirectory, e.g. `assets/dbt-logo.svg`
2. Set the [`asset-paths` config](/reference/project-configs/asset-paths) in your `dbt_project.yml` file so that this directory gets copied to the `target/` directory as part of `dbt docs generate`

Expand Down Expand Up @@ -336,19 +342,17 @@ models:

</File>

_[CLI users only]_

3. Run `dbt docs generate` — the `assets` directory will be copied to the `target` directory

4. Run `dbt docs serve` — the image will be rendered as part of your project documentation:

<Lightbox src="/img/reference/image-in-docs.png" title="The image at assets/dbt-logo.svg is rendered correctly"/>

If mixing images and text together, also consider using a docs block.
If mixing images and text, also consider using a docs block.

### Include an image from the web in your descriptions

Use the image URL to render the image.
This section applies to dbt Cloud and dbt Core users. Including an image from the web offers dynamic content, reduced repository size, accessibility, and ease of collaboration.

To include images from the web, specify the image URL in your model's `description` field:

<File name='models/schema.yml'>

Expand All @@ -367,5 +371,5 @@ models:

</File>

If mixing images and text together, also consider using a docs block.
If mixing images and text, also consider using a docs block.

0 comments on commit 7d8929a

Please sign in to comment.