Skip to content

Commit

Permalink
Merge branch 'current' into add-dbt-risingwave
Browse files Browse the repository at this point in the history
  • Loading branch information
runleonarun authored Jan 29, 2024
2 parents 58a85f9 + 2c75bb0 commit 6f682e8
Show file tree
Hide file tree
Showing 12 changed files with 190 additions and 25 deletions.
2 changes: 1 addition & 1 deletion website/docs/docs/build/metrics-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The keys for metrics definitions are:
| `config` | Provide the specific configurations for your metric. | Optional |
| `label` | The display name for your metric. This value will be shown in downstream tools. | Required |
| `filter` | You can optionally add a filter string to any metric type, applying filters to dimensions, entities, or time dimensions during metric computation. Consider it as your WHERE clause. | Optional |
| `meta` | Additional metadata you want to add to your metric. | Optional |


Here's a complete example of the metrics spec configuration:

Expand Down
14 changes: 7 additions & 7 deletions website/docs/docs/cloud/cloud-cli-installation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Install dbt Cloud CLI
sidebar_label: "Install dbt Cloud CLI"
sidebar_label: "Installation"
id: cloud-cli-installation
description: "Instructions for installing and configuring dbt Cloud CLI"
pagination_next: "docs/cloud/configure-cloud-cli"
Expand Down Expand Up @@ -75,7 +75,7 @@ Before you begin, make sure you have [Homebrew installed](http://brew.sh/) in yo
4. Clone your repository to your local computer using `git clone`. For example, to clone a GitHub repo using HTTPS format, run `git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY`.
5. After cloning your repo, [configure](/docs/cloud/configure-cloud-cli) the dbt Cloud CLI for your dbt Cloud project. This lets you run dbt commands like `dbt compile` to compile your project and validate models and tests. You can also add, edit, and synchronize files with your repo.
5. After cloning your repo, [configure](/docs/cloud/configure-cloud-cli) the dbt Cloud CLI for your dbt Cloud project. This lets you run dbt commands like [`dbt environment show`](/reference/commands/dbt-environment) to view your dbt Cloud configuration or `dbt compile` to compile your project and validate models and tests. You can also add, edit, and synchronize files with your repo.
</TabItem>
Expand Down Expand Up @@ -106,7 +106,7 @@ Note that if you are using VS Code, you must restart it to pick up modified envi
4. Clone your repository to your local computer using `git clone`. For example, to clone a GitHub repo using HTTPS format, run `git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY`.
5. After cloning your repo, [configure](/docs/cloud/configure-cloud-cli) the dbt Cloud CLI for your dbt Cloud project. This lets you run dbt commands like `dbt compile` to compile your project and validate models and tests. You can also add, edit, and synchronize files with your repo.
5. After cloning your repo, [configure](/docs/cloud/configure-cloud-cli) the dbt Cloud CLI for your dbt Cloud project. This lets you run dbt commands like [`dbt environment show`](/reference/commands/dbt-environment) to view your dbt Cloud configuration or `dbt compile` to compile your project and validate models and tests. You can also add, edit, and synchronize files with your repo.
</TabItem>
Expand Down Expand Up @@ -140,7 +140,7 @@ Advanced users can configure multiple projects to use the same Cloud CLI executa
4. Clone your repository to your local computer using `git clone`. For example, to clone a GitHub repo using HTTPS format, run `git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY`.
5. After cloning your repo, [configure](/docs/cloud/configure-cloud-cli) the dbt Cloud CLI for your dbt Cloud project. This lets you run dbt commands like `dbt compile` to compile your project and validate models and tests. You can also add, edit, and synchronize files with your repo.
5. After cloning your repo, [configure](/docs/cloud/configure-cloud-cli) the dbt Cloud CLI for your dbt Cloud project. This lets you run dbt commands like [`dbt environment show`](/reference/commands/dbt-environment) to view your dbt Cloud configuration or `dbt compile` to compile your project and validate models and tests. You can also add, edit, and synchronize files with your repo.
</TabItem>
Expand Down Expand Up @@ -205,7 +205,7 @@ We recommend using virtual environments (venv) to namespace `cloud-cli`.
4. Clone your repository to your local computer using `git clone`. For example, to clone a GitHub repo using HTTPS format, run `git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY`.
5. After cloning your repo, [configure](/docs/cloud/configure-cloud-cli) the dbt Cloud CLI for your dbt Cloud project. This lets you run dbt commands like `dbt compile` to compile your project and validate models and tests. You can also add, edit, and synchronize files with your repo.
5. After cloning your repo, [configure](/docs/cloud/configure-cloud-cli) the dbt Cloud CLI for your dbt Cloud project. This lets you run dbt commands like [`dbt environment show`](/reference/commands/dbt-environment) to view your dbt Cloud configuration or `dbt compile` to compile your project and validate models and tests. You can also add, edit, and synchronize files with your repo.
</TabItem>
Expand Down Expand Up @@ -253,12 +253,12 @@ To update:
Visual Studio (VS) Code extensions enhance command line tools by adding extra functionalities. The dbt Cloud CLI is fully compatible with dbt Core, however, it doesn't support some dbt Core APIs required by certain tools, for example, VS Code extensions.
You can use extensions like [dbt-power-user](https://www.dbt-power-user.com/) with the dbt Cloud CLI by following these steps:
You can use extensions like [dbt-power-user](https://marketplace.visualstudio.com/items?itemName=innoverio.vscode-dbt-power-user) with the dbt Cloud CLI by following these steps:
- [Install](/docs/cloud/cloud-cli-installation?install=brew) it using Homebrew along with dbt Core.
- [Create an alias](#faqs) to run the dbt Cloud CLI as `dbt-cloud`.
This setup allows dbt-power-user to continue to work with dbt Core in the background, alongside the dbt Cloud CLI.
This setup allows dbt-power-user to continue to work with dbt Core in the background, alongside the dbt Cloud CLI. For more, check the dbt Power User [documentation](https://docs.myaltimate.com/).
## FAQs
Expand Down
10 changes: 6 additions & 4 deletions website/docs/docs/cloud/configure-cloud-cli.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Configure dbt Cloud CLI
title: Configure and use the dbt Cloud CLI
id: configure-cloud-cli
description: "Instructions on how to configure the dbt Cloud CLI"
sidebar_label: "Configure dbt Cloud CLI"
sidebar_label: "Configuration and usage"
pagination_next: null
---

Expand Down Expand Up @@ -75,7 +75,9 @@ Once you install the dbt Cloud CLI, you need to configure it to connect to a dbt

- To find your project ID, select **Develop** in the dbt Cloud navigation menu. You can use the URL to find the project ID. For example, in `https://cloud.getdbt.com/develop/26228/projects/123456`, the project ID is `123456`.

6. You can now [use the dbt Cloud CLI](#use-the-dbt-cloud-cli) and run [dbt commands](/reference/dbt-commands) like `dbt compile`. With your repo recloned, you can add, edit, and sync files with your repo.
6. You should now be able to [use the dbt Cloud CLI](#use-the-dbt-cloud-cli) and run [dbt commands](/reference/dbt-commands) like [`dbt environment show`](/reference/commands/dbt-environment) to view your dbt Cloud configuration details or `dbt compile` to compile models in your dbt project.

With your repo recloned, you can add, edit, and sync files with your repo.

### Set environment variables

Expand All @@ -89,7 +91,7 @@ To set environment variables in the dbt Cloud CLI for your dbt project:

## Use the dbt Cloud CLI

- The dbt Cloud CLI uses the same set of [dbt commands](/reference/dbt-commands) and [MetricFlow commands](/docs/build/metricflow-commands) as dbt Core to execute the commands you provide.
- The dbt Cloud CLI uses the same set of [dbt commands](/reference/dbt-commands) and [MetricFlow commands](/docs/build/metricflow-commands) as dbt Core to execute the commands you provide. For example, use the [`dbt environment`](/reference/commands/dbt-environment) command to view your dbt Cloud configuration details.
- It allows you to automatically defer build artifacts to your Cloud project's production environment.
- It also supports [project dependencies](/docs/collaborate/govern/project-dependencies), which allows you to depend on another project using the metadata service in dbt Cloud.
- Project dependencies instantly connect to and reference (or `ref`) public models defined in other projects. You don't need to execute or analyze these upstream models yourself. Instead, you treat them as an API that returns a dataset.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Refer to the [FAQs](#faqs) for more info.

In order to add project dependencies and resolve cross-project `ref`, you must:
- Use dbt v1.6 or higher for **both** the upstream ("producer") project and the downstream ("consumer") project.
- Define models in an upstream ("producer") project that are configured with [`access: public`](/reference/resource-configs/access)
- Have a deployment environment in the upstream ("producer") project [that is set to be your production environment](/docs/deploy/deploy-environments#set-as-production-environment)
- Have a successful run of the upstream ("producer") project
- Have a multi-tenant or single-tenant [dbt Cloud Enterprise](https://www.getdbt.com/pricing) account (Azure ST is not supported but coming soon)
Expand Down
98 changes: 98 additions & 0 deletions website/docs/reference/commands/dbt-environment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
title: "About dbt environment command"
sidebar_label: "environment"
id: dbt-environment
---

The `dbt environment` command enables you to interact with your dbt Cloud environment. Use the command for:

- 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 environment` in the [dbt Cloud CLI](/docs/cloud/cloud-cli-installation). To use them, add a command or option like this: `dbt environment [command]` or use the shorthand `dbt env [command]`.

### dbt environment show

`show` command &mdash; To view your local and dbt Cloud configuration details. To run the command with the dbt Cloud CLI, type one of the following commands, including the shorthand:

```shell
dbt environment show
```
```shell
dbt env show
```

The command returns the following information:

```bash
❯ dbt env show
Local Configuration:
Active account ID 185854
Active project ID 271692
Active host name cloud.getdbt.com
dbt_cloud.yml file path /Users/cesar/.dbt/dbt_cloud.yml
dbt_project.yml file path /Users/cesar/git/cloud-cli-test-project/dbt_project.yml
dbt Cloud CLI version 0.35.7
OS info darwin arm64

Cloud Configuration:
Account ID 185854
Project ID 271692
Project name Snowflake
Environment ID 243762
Environment name Development
Defer environment ID [N/A]
dbt version 1.6.0-latest
Target name default
Connection type snowflake

Snowflake Connection Details:
Account ska67070
Warehouse DBT_TESTING_ALT
Database DBT_TEST
Schema CLOUD_CLI_TESTING
Role SYSADMIN
User dbt_cloud_user
Client session keep alive false
```

Note, that dbt Cloud won't return anything that is a secret key and will return an 'NA' for any field that isn't configured.

### dbt environment flags

Use the following flags (or options) with the `dbt environment` command:

- `-h`, `--help` &mdash; To view the help documentation for a specific command in your command line interface.

```shell
dbt environment [command] --help
dbt environment [command] -h
```

The `--help` flag returns the following information:

```bash
❯ dbt help environment
Interact with dbt environments

Usage:
dbt environment [command]

Aliases:
environment, env

Available Commands:
show Show the working environment

Flags:
-h, --help help for environment

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

For example, to view the help documentation for the `show` command, type one of the following commands, including the shorthand:

```shell
dbt environment show --help
dbt env show -h
```
6 changes: 0 additions & 6 deletions website/docs/reference/commands/deps.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ There are two flags related to `package-lock.yml`:
- `dbt deps --lock` &mdash; creates or updates the `package-lock.yml` file but does not install the packages.
- `dbt deps --upgrade` &mdash; creates or updates the `package-lock.yml` file with the most recent dependencies from `packages.yml`. Also install the packages unless the `--lock` flag is also passed.

The `--add-package` flag allows you to add a package to the `packages.yml` with configurable `--version` and `--source` information. The `--dry-run` flag, when set to `False`(default), recompiles the `package-lock.yml` file after a new package is added to the `packages.yml` file. Set the flag to `True` for the changes to not persist.

Examples of the `--add-package` flag:
```shell
# add package from hub (--source arg defaults to "hub")
Expand All @@ -83,9 +81,5 @@ dbt deps --add-package https://github.com/fivetran/[email protected] --source

# add package from local
dbt deps --add-package /opt/dbt/redshift --source local

# add package to packages.yml and package-lock.yml WITHOUT actually installing dependencies
dbt deps --add-package dbt-labs/[email protected] --dry-run

```
</VersionBlock>
3 changes: 2 additions & 1 deletion website/docs/reference/dbt-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ All commands in the table are compatible with either the dbt Cloud IDE, dbt Clou

You can run dbt commands in your specific tool by prefixing them with `dbt`. For example, to run the `test` command, type `dbt test`.

| Command | Description | Compatible tools | Version |
| Command | Description | Compatible tools | <div style={{width:'220px'}}>Version</div> |
| ------- | ----------- | ---------------- | ------- |
| [build](/reference/commands/build) | Build and test all selected resources (models, seeds, snapshots, tests) | All | All [supported versions](/docs/dbt-versions/core) |
| cancel | Cancels the most recent invocation.| dbt Cloud CLI | Requires [dbt v1.6 or higher](/docs/dbt-versions/core) |
Expand All @@ -27,6 +27,7 @@ You can run dbt commands in your specific tool by prefixing them with `dbt`. Fo
| [debug](/reference/commands/debug) | Debugs dbt connections and projects | dbt Cloud IDE <br /> dbt Core | All [supported versions](/docs/dbt-versions/core) |
| [deps](/reference/commands/deps) | Downloads dependencies for a project | All | All [supported versions](/docs/dbt-versions/core) |
| [docs](/reference/commands/cmd-docs) | Generates documentation for a project | All | All [supported versions](/docs/dbt-versions/core) |
| [environment](/reference/commands/dbt-environment) | Enables you to interact with your dbt Cloud environment. | dbt Cloud CLI | Requires [dbt v1.5 or higher](/docs/dbt-versions/core) |
| help | Displays help information for any command | dbt Core <br /> 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) |
| [list](/reference/commands/list) | Lists resources defined in a dbt project | All | All [supported versions](/docs/dbt-versions/core) |
Expand Down
1 change: 1 addition & 0 deletions website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,7 @@ const sidebarSettings = {
"reference/commands/compile",
"reference/commands/debug",
"reference/commands/deps",
"reference/commands/dbt-environment",
"reference/commands/init",
"reference/commands/list",
"reference/commands/parse",
Expand Down
24 changes: 19 additions & 5 deletions website/snippets/_sl-partner-links.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@ The following tools integrate with the dbt Semantic Layer:
</a>
</div>

<div className="card-container">
<Card
title="Delphi"
body="Learn how to connect Delphi to the dbt Semantic Layer and access metrics from any integrated tool."
link="https://docs.delphihq.com/getting-started"
icon="delphi"/>
<a href="https://docs.delphihq.com/getting-started"
className="external-link"
target="_blank"
rel="noopener noreferrer">
<Icon name='fa-external-link' />
</a>
</div>

<div className="card-container">
<Card
title="Klipfolio PowerMetrics"
Expand Down Expand Up @@ -88,11 +102,11 @@ The following tools integrate with the dbt Semantic Layer:

<div className="card-container">
<Card
title="Delphi"
body="Learn how to connect Delphi to the dbt Semantic Layer and access metrics from any integrated tool."
link="https://docs.delphihq.com/getting-started"
icon="delphi"/>
<a href="https://docs.delphihq.com/getting-started"
title="Steep"
body="Connect Steep to the dbt Semantic Layer for centralized, scalable analytics."
link="https://help.steep.app/integrations/dbt-cloud"
icon="steep"/>
<a href="https://help.steep.app/integrations/dbt-cloud"
className="external-link"
target="_blank"
rel="noopener noreferrer">
Expand Down
27 changes: 27 additions & 0 deletions website/static/img/icons/steep.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion website/static/img/icons/white/klipfolio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 6f682e8

Please sign in to comment.