Skip to content

Commit

Permalink
Merge branch 'current' into new-branch-name-VE
Browse files Browse the repository at this point in the history
  • Loading branch information
nataliefiann authored Jan 27, 2025
2 parents efb8725 + cfe751e commit bbc3290
Show file tree
Hide file tree
Showing 18 changed files with 375 additions and 25 deletions.
240 changes: 240 additions & 0 deletions website/blog/2025-01-24-sql-comprehension-technologies.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion website/blog/authors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ colin_rogers:
organization: dbt Labs
dave_connors:
image_url: /img/blog/authors/dconnors.jpeg
job_title: Senior Developer Experience Advocate
job_title: Staff Developer Experience Advocate
links:
- icon: fa-github
url: https://github.com/dave-connors-3
Expand Down
12 changes: 3 additions & 9 deletions website/docs/docs/cloud/cloud-cli-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,16 +313,10 @@ This alias will allow you to use the <code>dbt-cloud</code> command to invoke th
</DetailsToggle>
<DetailsToggle alt_header="Why am I receiving a `Session occupied` error?">
If you've ran a dbt command and receive a <code>Session occupied</code> error, you can reattach to your existing session with <code>dbt reattach</code> and then press <code>Control-C</code> and choose to cancel the invocation.
</DetailsToggle>
<DetailsToggle alt_header="Why am I receiving a `Stuck session` error when trying to run a new command?">
The dbt Cloud CLI allows only one command that writes to the data warehouse at a time. If you attempt to run multiple write commands simultaneously (for example, `dbt run` and `dbt build`), you will encounter a `stuck session` error. To resolve this, cancel the specific invocation by passing its ID to the cancel command. For more information, refer to [parallel execution](/reference/dbt-commands#parallel-execution).
The Cloud CLI allows only one command that writes to the data warehouse at a time. If you attempt to run multiple write commands simultaneously (for example, `dbt run` and `dbt build`), you will encounter a `stuck session` error. To resolve this, cancel the specific invocation by passing its ID to the cancel command. For more information, refer to [parallel execution](/reference/dbt-commands#parallel-execution).
</DetailsToggle>
</DetailsToggle>
<FAQ path="Troubleshooting/long-sessions-cloud-cli" />
12 changes: 7 additions & 5 deletions website/docs/docs/cloud/configure-cloud-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ As a tip, most command-line tools have a `--help` flag to show available command
- `dbt run --help`: Lists the flags available for the `run` command
:::

### Lint SQL files
## Lint SQL files

From the dbt Cloud CLI, you can invoke [SQLFluff](https://sqlfluff.com/) which is a modular and configurable SQL linter that warns you of complex functions, syntax, formatting, and compilation errors. Many of the same flags that you can pass to SQLFluff are available from the dbt Cloud CLI.

Expand Down Expand Up @@ -154,7 +154,8 @@ When running `dbt sqlfluff` from the dbt Cloud CLI, the following are important
- An SQLFluff command will return an exit code of 0 if it ran with any file violations. This dbt behavior differs from SQLFluff behavior, where a linting violation returns a non-zero exit code. dbt Labs plans on addressing this in a later release.

## FAQs
<Expandable alt_header="How to create a .dbt directory and move your file">

<DetailsToggle alt_header="How to create a .dbt directory and move your file">

If you've never had a `.dbt` directory, you should perform the following recommended steps to create one. If you already have a `.dbt` directory, move the `dbt_cloud.yml` file into it.

Expand Down Expand Up @@ -195,11 +196,12 @@ move %USERPROFILE%\Downloads\dbt_cloud.yml %USERPROFILE%\.dbt\dbt_cloud.yml

This command moves the `dbt_cloud.yml` from the `Downloads` folder to the `.dbt` folder. If your `dbt_cloud.yml` file is located elsewhere, adjust the path accordingly.

</Expandable>
</DetailsToggle>

<Expandable alt_header="How to skip artifacts from being downloaded">
<DetailsToggle alt_header="How to skip artifacts from being downloaded">

By default, [all artifacts](/reference/artifacts/dbt-artifacts) are downloaded when you execute dbt commands from the dbt Cloud CLI. To skip these files from being downloaded, add `--download-artifacts=false` to the command you want to run. This can help improve run-time performance but might break workflows that depend on assets like the [manifest](/reference/artifacts/manifest-json).

</DetailsToggle>

</Expandable>
<FAQ path="Troubleshooting/long-sessions-cloud-cli" />
12 changes: 10 additions & 2 deletions website/docs/docs/collaborate/data-tile.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ Data health tiles rely on [exposures](/docs/build/exposures) to surface data hea
- You must have a dbt Cloud account on a [Team or Enterprise plan](https://www.getdbt.com/pricing/).
- You must be an account admin to set up [service tokens](/docs/dbt-cloud-apis/service-tokens#permissions-for-service-account-tokens).
- You must have [develop permissions](/docs/cloud/manage-access/seats-and-users).
- Have [exposures](/docs/build/exposures) configured in your project and [source freshness](/docs/deploy/source-freshness) enabled in the job that generates this exposure.
- Have [exposures](/docs/build/exposures) defined in your project and [source freshness](/docs/deploy/source-freshness) enabled in the job that generates this exposure.
- The exposure used for the data health tile must have the [`type` property](/docs/build/exposures#available-properties) set to `dashboard`. Otherwise, you won't be able to view the **Embed data health tile in your dashboard** dropdown in dbt Explorer.

## View exposure in dbt Explorer

Expand Down Expand Up @@ -61,15 +62,22 @@ Follow these steps to set up your data health tile:

5. Copy the **Metadata Only** token and save it in a secure location. You'll need it token in the next steps.
6. Navigate back to dbt Explorer and select an exposure.

:::tip
The exposure used for the data health tile must have the [`type` property](/docs/build/exposures#available-properties) set to `dashboard`. Otherwise, you won't be able to view the **Embed data health tile in your dashboard** dropdown in dbt Explorer.
:::

7. Below the **Data health** section, expand on the toggle for instructions on how to embed the exposure tile (if you're an account admin with develop permissions).
8. In the expanded toggle, you'll see a text field where you can paste your **Metadata Only token**.
<Lightbox src="/img/docs/collaborate/dbt-explorer/data-tile-example.jpg" width="85%" title="Expand the toggle to embed data health tile into your dashboard." />

9. Once you’ve pasted your token, you can select either **URL** or **iFrame** depending on which you need to add to your dashboard.



If your analytics tool supports iFrames, you can embed the dashboard tile within it.

### Examples
## Examples
The following examples show how to embed the data health tile in Tableau and PowerBI.

<Tabs>
Expand Down
3 changes: 2 additions & 1 deletion website/docs/docs/dbt-versions/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ Release notes are grouped by month for both multi-tenant and virtual private clo

## January 2025


- **Enhancement**: The dbt Semantic Layer now fully supports the [`--favor-state` flag](/docs/cloud/about-cloud-develop-defer) when used with `defer` in the dbt Cloud IDE. This enhancement allows you to always resolve `{{ ref() }}` functions using staging or production metadata, ignoring any development version.
- **New**: Added the `dbt invocation` command to the [dbt Cloud CLI](/docs/cloud/cloud-cli-installation). This command allows you to view and manage active invocations, which are long-running sessions in the dbt Cloud CLI. For more information, see [dbt invocation](/reference/commands/invocation).
- **New**: Users can now switch themes directly from the user menu, available [in Preview](/docs/dbt-versions/product-lifecycles#dbt-cloud). We have added support for **Light mode** (default), **Dark mode**, and automatic theme switching based on system preferences. The selected theme is stored in the user profile and will follow users across all devices.
- Dark mode is currently available on the Developer plan and will be available for all [plans](https://www.getdbt.com/pricing) in the future. We’ll be rolling it out gradually, so stay tuned for updates. For more information, refer to [Change your dbt Cloud theme](/docs/cloud/about-cloud/change-your-dbt-cloud-theme).
- **Fix**: dbt Semantic Layer errors in the Cloud IDE are now displayed with proper formatting, fixing an issue where newlines appeared broken or difficult to read. This fix ensures error messages are more user-friendly and easier to parse.
Expand Down
14 changes: 14 additions & 0 deletions website/docs/faqs/Troubleshooting/long-sessions-cloud-cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: "I'm getting a \"Session occupied\" error in dbt Cloud CLI?"
description: "How to debug long-running sessions in dbt Cloud CLI"
sidebar_label: 'Debug long-running sessions in dbt Cloud CLI'
id: long-sessions-cloud-cli
---

If you're receiving a `Session occupied` error in the dbt Cloud CLI or if you're experiencing a long-running session, you can use the `dbt invocation list` command in a separate terminal window to view the status of your active session. This helps debug the issue and identify the arguments that are causing the long-running session.

To cancel an active session, use the `Ctrl + Z` shortcut.

To learn more about the `dbt invocation` command, see the [dbt invocation command reference](/reference/commands/invocation).

Alternatively, you can reattach to your existing session with <code>dbt reattach</code> and then press <code>Control-C</code> and choose to cancel the invocation.
92 changes: 92 additions & 0 deletions website/docs/reference/commands/invocation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
---
title: "About dbt invocation command"
sidebar_label: "invocation"
id: invocation
---

The `dbt invocation` command is available in the [dbt Cloud CLI](/docs/cloud/cloud-cli-installation) and allows you to:
- List active invocations to debug long-running or hanging invocations.
- Identify and investigate sessions causing the `Session occupied` error.
- Monitor currently active dbt commands (like `run`, `build`) in real-time.

The `dbt invocation` command only lists _active invocations_. If no sessions are running, the list will be empty. Completed sessions aren't included in the output.

## Usage

This page lists the command and flag you can use with `dbt invocation`. To use them, add a command or option like this: `dbt invocation [command]`.

Available flags in the command line interface (CLI) are [`help`](#dbt-invocation-help) and [`list`](#dbt-invocation-list).

### dbt invocation help

The `help` command provides you with the help output for the `invocation` command in the CLI, including the available flags.

```shell
dbt invocation help
```

or

```shell
dbt help invocation
```

The command returns the following information:

```bash
dbt invocation help
Manage invocations

Usage:
dbt invocation [command]

Available Commands:
list List active invocations

Flags:
-h, --help help for invocation

Global Flags:
--log-format LogFormat The log format, either json or plain. (default plain)
--log-level LogLevel The log level, one of debug, info, warning, error or fatal. (default info)
--no-color Disables colorization of the output.
-q, --quiet Suppress all non-error logging to stdout.

Use "dbt invocation [command] --help" for more information about a command.
```

### dbt invocation list

The `list` command provides you with a list of active invocations in your dbt Cloud CLI. When a long-running session is active, you can use this command in a separate terminal window to view the active session to help debug the issue.

```shell
dbt invocation list
```

The command returns the following information, including the `ID`, `status`, `type`, `arguments`, and `started at` time of the active session:

```bash
dbt invocation list

Active Invocations:
ID 6dcf4723-e057-48b5-946f-a4d87e1d117a
Status running
Type cli
Args [run --select test.sql]
Started At 2025-01-24 11:03:19

➜ jaffle-shop git:(test-cli) ✗
```

:::tip

To cancel an active session in the terminal, use the `Ctrl + Z` shortcut.

:::

## Related docs

- [Install dbt Cloud CLI](/docs/cloud/cloud-cli-installation)
- [Troubleshooting dbt Cloud CLI 'Session occupied' error](/faqs/Troubleshooting/long-sessions-cloud-cli)


1 change: 1 addition & 0 deletions website/docs/reference/dbt-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Commands with a ('❌') indicate write commands, commands with a ('✅') indicat
| [environment](/reference/commands/dbt-environment) | Enables you to interact with your dbt Cloud environment. | N/A | dbt Cloud CLI <br /> Requires [dbt v1.5 or higher](/docs/dbt-versions/core) |
| help | Displays help information for any command | N/A | dbt Core, dbt Cloud CLI <br /> All [supported versions](/docs/dbt-versions/core) |
| [init](/reference/commands/init) | Initializes a new dbt project || dbt Core<br /> All [supported versions](/docs/dbt-versions/core) |
| [invocation](/reference/commands/invocation) | Enables users to debug long-running sessions by interacting with active invocations.| N/A | dbt Cloud CLI<br /> Requires [dbt v1.5 or higher](/docs/dbt-versions/core) |
| [list](/reference/commands/list) | Lists resources defined in a dbt project || All tools <br /> All [supported versions](/docs/dbt-versions/core) |
| [parse](/reference/commands/parse) | Parses a project and writes detailed timing info || All tools <br /> All [supported versions](/docs/dbt-versions/core) |
| reattach | Reattaches to the most recent invocation to retrieve logs and artifacts. | N/A | dbt Cloud CLI <br /> Requires [dbt v1.6 or higher](/docs/dbt-versions/core) |
Expand Down
11 changes: 4 additions & 7 deletions website/docs/reference/resource-configs/full_refresh.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,17 @@ seeds:

</Tabs>

- If `full_refresh:true` &mdash; the configured resources(s) will full-refresh when `dbt run --full-refresh` is invoked.
- If `full_refresh:false` &mdash; the configured resources(s) will _not_ full-refresh when `dbt run --full-refresh` is invoked.


## Description

The `full_refresh` config allows you to optionally configure whether a resource will always or never perform a full-refresh. This config is an override for the `--full-refresh` command line flag used when running dbt commands.

You can set the `full_refresh` config in the `dbt_project.yml` file or in a resource config.

| `full_refresh` value | Behavior |
| ---------------------------- | -------- |
| `true` | The resource always full-refreshes, regardless of the presence or absence of the `--full-refresh` flag. |
| `false` | The resource never full-refreshes, even if the `--full-refresh` flag is provided. |
| `none` or omitted | The resource follows the behavior of the `--full-refresh` flag. If the flag is used, the resource will full-refresh; otherwise, it won't. |
| If set to `true` | The resource _always_ performs a full refresh, regardless of whether you pass the `--full-refresh` flag in the dbt command. |
| If set to `false` | The resource _never_ performs a full refresh, regardless of whether you pass the `--full-refresh` flag in the dbt command. |
| If set to `none` or omitted | The resource follows the behavior of the `--full-refresh` flag. If the flag is used, the resource will perform a full refresh; otherwise, it will not. |

#### Note
- The `--full-refresh` flag also supports a short name, `-f`.
Expand Down
1 change: 1 addition & 0 deletions website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,7 @@ const sidebarSettings = {
"reference/commands/deps",
"reference/commands/dbt-environment",
"reference/commands/init",
"reference/commands/invocation",
"reference/commands/list",
"reference/commands/parse",
"reference/commands/retry",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bbc3290

Please sign in to comment.