From d180f3fee705497522e8e7a3568ac20633dd25bb Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Thu, 23 Jan 2025 18:34:05 +0000 Subject: [PATCH 01/13] add page --- website/docs/reference/commands/invocation.md | 51 +++++++++++++++++++ website/docs/reference/dbt-commands.md | 1 + 2 files changed, 52 insertions(+) create mode 100644 website/docs/reference/commands/invocation.md diff --git a/website/docs/reference/commands/invocation.md b/website/docs/reference/commands/invocation.md new file mode 100644 index 00000000000..422f2df2b8c --- /dev/null +++ b/website/docs/reference/commands/invocation.md @@ -0,0 +1,51 @@ +--- +title: "About dbt invocation command" +sidebar_label: "invocation" +id: invocation +--- + +The `dbt invocation` command enables you to view current active invocations. This is useful when you want to see the commands that have hanged or are taking too long. + +- Viewing your local configuration details (account ID, active project ID, deployment environment, and more). +- Viewing your dbt Cloud configuration details (environment ID, environment name, connection type, and more). + +This guide lists all the commands and options you can use with `dbt invocation` in the [dbt Cloud CLI](/docs/cloud/cloud-cli-installation). To use them, add a command or option like this: `dbt invocation [command]` or use the shorthand `dbt inv [command]`. + +### dbt invocation help + +The `help` command allows you to view the help output for a specific command in your command line interface, 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. +``` + diff --git a/website/docs/reference/dbt-commands.md b/website/docs/reference/dbt-commands.md index 9cbc5e5e38b..91b6af6156d 100644 --- a/website/docs/reference/dbt-commands.md +++ b/website/docs/reference/dbt-commands.md @@ -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
Requires [dbt v1.5 or higher](/docs/dbt-versions/core) | | help | Displays help information for any command | N/A | dbt Core, dbt Cloud CLI
All [supported versions](/docs/dbt-versions/core) | | [init](/reference/commands/init) | Initializes a new dbt project | ✅ | dbt Core
All [supported versions](/docs/dbt-versions/core) | +| [invocation](/reference/commands/init) | Enables user to interact with current active invocations | NA | dbt Cloud CLI
All [supported versions](/docs/dbt-versions/core) | | [list](/reference/commands/list) | Lists resources defined in a dbt project | ✅ | All tools
All [supported versions](/docs/dbt-versions/core) | | [parse](/reference/commands/parse) | Parses a project and writes detailed timing info | ✅ | All tools
All [supported versions](/docs/dbt-versions/core) | | reattach | Reattaches to the most recent invocation to retrieve logs and artifacts. | N/A | dbt Cloud CLI
Requires [dbt v1.6 or higher](/docs/dbt-versions/core) | From 22c0bcecdde05832d4ee98b77e6debf64632bd2e Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Thu, 23 Jan 2025 18:35:33 +0000 Subject: [PATCH 02/13] fix --- website/docs/reference/commands/invocation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/reference/commands/invocation.md b/website/docs/reference/commands/invocation.md index 422f2df2b8c..a7d8b3c7e18 100644 --- a/website/docs/reference/commands/invocation.md +++ b/website/docs/reference/commands/invocation.md @@ -9,7 +9,7 @@ The `dbt invocation` command enables you to view current active invocations. Thi - Viewing your local configuration details (account ID, active project ID, deployment environment, and more). - Viewing your dbt Cloud configuration details (environment ID, environment name, connection type, and more). -This guide lists all the commands and options you can use with `dbt invocation` in the [dbt Cloud CLI](/docs/cloud/cloud-cli-installation). To use them, add a command or option like this: `dbt invocation [command]` or use the shorthand `dbt inv [command]`. +This page lists the command and flag you can use with `dbt invocation` in the [dbt Cloud CLI](/docs/cloud/cloud-cli-installation). To use them, add a command or option like this: `dbt invocation [command]`. ### dbt invocation help From 1c4619037bde51b5183a94b5f52fed2d896850c2 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Fri, 24 Jan 2025 11:27:58 +0000 Subject: [PATCH 03/13] add faq and new page --- .../docs/docs/cloud/cloud-cli-installation.md | 4 +- .../docs/docs/cloud/configure-cloud-cli.md | 4 +- .../long-sessions-cloud-cli.md | 12 ++++++ website/docs/reference/commands/invocation.md | 37 ++++++++++++++++--- website/docs/reference/dbt-commands.md | 2 +- website/sidebars.js | 1 + 6 files changed, 51 insertions(+), 9 deletions(-) create mode 100644 website/docs/faqs/Troubleshooting/long-sessions-cloud-cli.md diff --git a/website/docs/docs/cloud/cloud-cli-installation.md b/website/docs/docs/cloud/cloud-cli-installation.md index a80f1a587e0..e3c31b6df1e 100644 --- a/website/docs/docs/cloud/cloud-cli-installation.md +++ b/website/docs/docs/cloud/cloud-cli-installation.md @@ -325,4 +325,6 @@ If you've ran a dbt command and receive a Session occupied error, y 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). - \ No newline at end of file + + + diff --git a/website/docs/docs/cloud/configure-cloud-cli.md b/website/docs/docs/cloud/configure-cloud-cli.md index 5e0a285c5c5..8c11b869895 100644 --- a/website/docs/docs/cloud/configure-cloud-cli.md +++ b/website/docs/docs/cloud/configure-cloud-cli.md @@ -154,6 +154,7 @@ 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 + 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. @@ -201,5 +202,6 @@ This command moves the `dbt_cloud.yml` from the `Downloads` folder to the `.dbt` 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). - + + diff --git a/website/docs/faqs/Troubleshooting/long-sessions-cloud-cli.md b/website/docs/faqs/Troubleshooting/long-sessions-cloud-cli.md new file mode 100644 index 00000000000..96306e56cbc --- /dev/null +++ b/website/docs/faqs/Troubleshooting/long-sessions-cloud-cli.md @@ -0,0 +1,12 @@ +--- +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 you identify the model that's causing the long-running session and debug the issue. + +To cancel the session, use the `Ctrl + Z` shortcut to cancel the session. + +To learn more about the `dbt invocation` command, see the [dbt invocation command reference](/reference/commands/invocation). diff --git a/website/docs/reference/commands/invocation.md b/website/docs/reference/commands/invocation.md index a7d8b3c7e18..a946d7d2f7f 100644 --- a/website/docs/reference/commands/invocation.md +++ b/website/docs/reference/commands/invocation.md @@ -4,22 +4,25 @@ sidebar_label: "invocation" id: invocation --- -The `dbt invocation` command enables you to view current active invocations. This is useful when you want to see the commands that have hanged or are taking too long. +The `dbt invocation` command enables you to view active invocations when sessions are taking too long to execute or when you get a `Session occupied` error in the dbt Cloud CLI. This command is useful for debugging long-running or 'hanging' sessions. This command isn't needed for completed sessions (sessions that have completed running). -- Viewing your local configuration details (account ID, active project ID, deployment environment, and more). -- Viewing your dbt Cloud configuration details (environment ID, environment name, connection type, and more). +This page lists the command and flag you can use with `dbt invocation` in the [dbt Cloud CLI](/docs/cloud/cloud-cli-installation). To use them, add a command or option like this: `dbt invocation [flag]`. -This page lists the command and flag you can use with `dbt invocation` in the [dbt Cloud CLI](/docs/cloud/cloud-cli-installation). 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). + +## Usage + +The following examples show how to use the `dbt invocation` command in the dbt Cloud CLI using the `help` and `list` flags. ### dbt invocation help -The `help` command allows you to view the help output for a specific command in your command line interface, including the available flags. +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 +or ```shell dbt help invocation @@ -49,3 +52,25 @@ Global Flags: 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 and its status. + +```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) ✗ +``` diff --git a/website/docs/reference/dbt-commands.md b/website/docs/reference/dbt-commands.md index 91b6af6156d..dced2db96bd 100644 --- a/website/docs/reference/dbt-commands.md +++ b/website/docs/reference/dbt-commands.md @@ -45,7 +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
Requires [dbt v1.5 or higher](/docs/dbt-versions/core) | | help | Displays help information for any command | N/A | dbt Core, dbt Cloud CLI
All [supported versions](/docs/dbt-versions/core) | | [init](/reference/commands/init) | Initializes a new dbt project | ✅ | dbt Core
All [supported versions](/docs/dbt-versions/core) | -| [invocation](/reference/commands/init) | Enables user to interact with current active invocations | NA | dbt Cloud CLI
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
All [supported versions](/docs/dbt-versions/core) | | [list](/reference/commands/list) | Lists resources defined in a dbt project | ✅ | All tools
All [supported versions](/docs/dbt-versions/core) | | [parse](/reference/commands/parse) | Parses a project and writes detailed timing info | ✅ | All tools
All [supported versions](/docs/dbt-versions/core) | | reattach | Reattaches to the most recent invocation to retrieve logs and artifacts. | N/A | dbt Cloud CLI
Requires [dbt v1.6 or higher](/docs/dbt-versions/core) | diff --git a/website/sidebars.js b/website/sidebars.js index f120b6859ba..0f3f948b155 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -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", From c062a222ee58ae79858388b49eadda1b2071a428 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Fri, 24 Jan 2025 11:34:27 +0000 Subject: [PATCH 04/13] clarify --- website/docs/reference/commands/invocation.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/website/docs/reference/commands/invocation.md b/website/docs/reference/commands/invocation.md index a946d7d2f7f..0166b062892 100644 --- a/website/docs/reference/commands/invocation.md +++ b/website/docs/reference/commands/invocation.md @@ -4,15 +4,18 @@ sidebar_label: "invocation" id: invocation --- -The `dbt invocation` command enables you to view active invocations when sessions are taking too long to execute or when you get a `Session occupied` error in the dbt Cloud CLI. This command is useful for debugging long-running or 'hanging' sessions. This command isn't needed for completed sessions (sessions that have completed running). +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 sessions. +- Identify and investigate sessions causing the `Session occupied` error. +- Monitor currently active dbt commands (like `run`, `build`) in real-time. -This page lists the command and flag you can use with `dbt invocation` in the [dbt Cloud CLI](/docs/cloud/cloud-cli-installation). To use them, add a command or option like this: `dbt invocation [flag]`. - -Available flags in the command line interface (CLI) are [`help`](#dbt-invocation-help) and [`list`](#dbt-invocation-list). +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 -The following examples show how to use the `dbt invocation` command in the dbt Cloud CLI using the `help` and `list` flags. +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 [flag]`. + +Available flags in the command line interface (CLI) are [`help`](#dbt-invocation-help) and [`list`](#dbt-invocation-list). ### dbt invocation help @@ -74,3 +77,9 @@ Active Invocations: ➜ jaffle-shop git:(test-cli) ✗ ``` + +## Related docs + +- [Install dbt Cloud CLI](/docs/cloud/cloud-cli-installation) +- [Troubleshooting dbt Cloud CLI 'Session occupied' error](/faqs/Troubleshooting/long-sessions-cloud-cli) + From 6575c9d3747e3e2e91c831dcfc0566d50a5cd215 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Fri, 24 Jan 2025 11:37:01 +0000 Subject: [PATCH 05/13] clarify further --- .../docs/faqs/Troubleshooting/long-sessions-cloud-cli.md | 2 +- website/docs/reference/commands/invocation.md | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/website/docs/faqs/Troubleshooting/long-sessions-cloud-cli.md b/website/docs/faqs/Troubleshooting/long-sessions-cloud-cli.md index 96306e56cbc..3593954934c 100644 --- a/website/docs/faqs/Troubleshooting/long-sessions-cloud-cli.md +++ b/website/docs/faqs/Troubleshooting/long-sessions-cloud-cli.md @@ -7,6 +7,6 @@ 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 you identify the model that's causing the long-running session and debug the issue. -To cancel the session, use the `Ctrl + Z` shortcut to cancel the 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). diff --git a/website/docs/reference/commands/invocation.md b/website/docs/reference/commands/invocation.md index 0166b062892..837733d20da 100644 --- a/website/docs/reference/commands/invocation.md +++ b/website/docs/reference/commands/invocation.md @@ -57,7 +57,7 @@ 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 and its status. +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 @@ -78,8 +78,15 @@ Active Invocations: ➜ 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) + From 76653d3b57ca2bc687f2016fbcd09766771dd21b Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Fri, 24 Jan 2025 11:37:33 +0000 Subject: [PATCH 06/13] fix lint --- website/docs/reference/dbt-commands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/reference/dbt-commands.md b/website/docs/reference/dbt-commands.md index dced2db96bd..6b81ff69b95 100644 --- a/website/docs/reference/dbt-commands.md +++ b/website/docs/reference/dbt-commands.md @@ -45,7 +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
Requires [dbt v1.5 or higher](/docs/dbt-versions/core) | | help | Displays help information for any command | N/A | dbt Core, dbt Cloud CLI
All [supported versions](/docs/dbt-versions/core) | | [init](/reference/commands/init) | Initializes a new dbt project | ✅ | dbt Core
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
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
All [supported versions](/docs/dbt-versions/core) | | [list](/reference/commands/list) | Lists resources defined in a dbt project | ✅ | All tools
All [supported versions](/docs/dbt-versions/core) | | [parse](/reference/commands/parse) | Parses a project and writes detailed timing info | ✅ | All tools
All [supported versions](/docs/dbt-versions/core) | | reattach | Reattaches to the most recent invocation to retrieve logs and artifacts. | N/A | dbt Cloud CLI
Requires [dbt v1.6 or higher](/docs/dbt-versions/core) | From 1488e3993fb87420a817239951f2bb21fc301b0f Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Fri, 24 Jan 2025 11:39:11 +0000 Subject: [PATCH 07/13] fix faq --- website/docs/faqs/Troubleshooting/long-sessions-cloud-cli.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/faqs/Troubleshooting/long-sessions-cloud-cli.md b/website/docs/faqs/Troubleshooting/long-sessions-cloud-cli.md index 3593954934c..bfd98674798 100644 --- a/website/docs/faqs/Troubleshooting/long-sessions-cloud-cli.md +++ b/website/docs/faqs/Troubleshooting/long-sessions-cloud-cli.md @@ -5,7 +5,7 @@ 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 you identify the model that's causing the long-running session and debug the issue. +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. From 773cb82d7696b273504ead278481c7e1bb03ae9c Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Fri, 24 Jan 2025 11:43:29 +0000 Subject: [PATCH 08/13] add rn --- website/docs/docs/dbt-versions/release-notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/dbt-versions/release-notes.md b/website/docs/docs/dbt-versions/release-notes.md index bda22baa3ab..2b1be2a9db6 100644 --- a/website/docs/docs/dbt-versions/release-notes.md +++ b/website/docs/docs/dbt-versions/release-notes.md @@ -18,7 +18,7 @@ Release notes are grouped by month for both multi-tenant and virtual private clo ## January 2025 - +- **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](/docs/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. From 11d1d3a12217173dba16e14eba688eaaefa0132f Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Fri, 24 Jan 2025 12:05:35 +0000 Subject: [PATCH 09/13] Update website/docs/docs/dbt-versions/release-notes.md --- website/docs/docs/dbt-versions/release-notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/dbt-versions/release-notes.md b/website/docs/docs/dbt-versions/release-notes.md index 2b1be2a9db6..f69e8cacea7 100644 --- a/website/docs/docs/dbt-versions/release-notes.md +++ b/website/docs/docs/dbt-versions/release-notes.md @@ -18,7 +18,7 @@ Release notes are grouped by month for both multi-tenant and virtual private clo ## January 2025 -- **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](/docs/reference/commands/invocation). +- **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. From aff173e2e70bd71a9d3d6ee414988a0e916f16a9 Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Fri, 24 Jan 2025 14:25:50 +0000 Subject: [PATCH 10/13] Update website/docs/reference/commands/invocation.md Co-authored-by: vfcoelho --- website/docs/reference/commands/invocation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/reference/commands/invocation.md b/website/docs/reference/commands/invocation.md index 837733d20da..6530c1767df 100644 --- a/website/docs/reference/commands/invocation.md +++ b/website/docs/reference/commands/invocation.md @@ -13,7 +13,7 @@ The `dbt invocation` command only lists _active invocations_. If no sessions are ## 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 [flag]`. +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). From f3390b2d8270821f7754f23707b87c9c6a39fd00 Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Fri, 24 Jan 2025 14:26:07 +0000 Subject: [PATCH 11/13] Update website/docs/reference/dbt-commands.md Co-authored-by: vfcoelho --- website/docs/reference/dbt-commands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/reference/dbt-commands.md b/website/docs/reference/dbt-commands.md index 6b81ff69b95..bdaa74e1f3b 100644 --- a/website/docs/reference/dbt-commands.md +++ b/website/docs/reference/dbt-commands.md @@ -45,7 +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
Requires [dbt v1.5 or higher](/docs/dbt-versions/core) | | help | Displays help information for any command | N/A | dbt Core, dbt Cloud CLI
All [supported versions](/docs/dbt-versions/core) | | [init](/reference/commands/init) | Initializes a new dbt project | ✅ | dbt Core
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
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
Requires [dbt v1.5 or higher](/docs/dbt-versions/core) | | [list](/reference/commands/list) | Lists resources defined in a dbt project | ✅ | All tools
All [supported versions](/docs/dbt-versions/core) | | [parse](/reference/commands/parse) | Parses a project and writes detailed timing info | ✅ | All tools
All [supported versions](/docs/dbt-versions/core) | | reattach | Reattaches to the most recent invocation to retrieve logs and artifacts. | N/A | dbt Cloud CLI
Requires [dbt v1.6 or higher](/docs/dbt-versions/core) | From 6400599445bf548b664f3a3b4b7c6409d9f26752 Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Fri, 24 Jan 2025 14:26:22 +0000 Subject: [PATCH 12/13] Update website/docs/reference/commands/invocation.md Co-authored-by: vfcoelho --- website/docs/reference/commands/invocation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/reference/commands/invocation.md b/website/docs/reference/commands/invocation.md index 6530c1767df..1961b2555da 100644 --- a/website/docs/reference/commands/invocation.md +++ b/website/docs/reference/commands/invocation.md @@ -5,7 +5,7 @@ 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 sessions. +- 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. From 95265d28c70e9b69ded8ccd1596de7ef132b620e Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Fri, 24 Jan 2025 15:56:54 +0000 Subject: [PATCH 13/13] update toggles --- website/docs/docs/cloud/cloud-cli-installation.md | 10 +--------- website/docs/docs/cloud/configure-cloud-cli.md | 10 +++++----- .../faqs/Troubleshooting/long-sessions-cloud-cli.md | 2 ++ 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/website/docs/docs/cloud/cloud-cli-installation.md b/website/docs/docs/cloud/cloud-cli-installation.md index e3c31b6df1e..9637b83f4b8 100644 --- a/website/docs/docs/cloud/cloud-cli-installation.md +++ b/website/docs/docs/cloud/cloud-cli-installation.md @@ -313,17 +313,9 @@ This alias will allow you to use the dbt-cloud command to invoke th - - - -If you've ran a dbt command and receive a Session occupied error, you can reattach to your existing session with dbt reattach and then press Control-C and choose to cancel the invocation. - - - - -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). +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). diff --git a/website/docs/docs/cloud/configure-cloud-cli.md b/website/docs/docs/cloud/configure-cloud-cli.md index 8c11b869895..f4f2f795a40 100644 --- a/website/docs/docs/cloud/configure-cloud-cli.md +++ b/website/docs/docs/cloud/configure-cloud-cli.md @@ -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. @@ -155,7 +155,7 @@ When running `dbt sqlfluff` from the dbt Cloud CLI, the following are important ## FAQs - + 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. @@ -196,12 +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. - + - + 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). - + diff --git a/website/docs/faqs/Troubleshooting/long-sessions-cloud-cli.md b/website/docs/faqs/Troubleshooting/long-sessions-cloud-cli.md index bfd98674798..22c9929b488 100644 --- a/website/docs/faqs/Troubleshooting/long-sessions-cloud-cli.md +++ b/website/docs/faqs/Troubleshooting/long-sessions-cloud-cli.md @@ -10,3 +10,5 @@ If you're receiving a `Session occupied` error in the dbt Cloud CLI or if you're 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 dbt reattach and then press Control-C and choose to cancel the invocation.