-
Notifications
You must be signed in to change notification settings - Fork 976
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
57 changed files
with
641 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,23 @@ | ||
## What are you changing in this pull request and why? | ||
<!--- | ||
Describe your changes and why you're making them. If linked to an open | ||
Describe your changes and why you're making them. If related to an open | ||
issue or a pull request on dbt Core, then link to them here! | ||
To learn more about the writing conventions used in the dbt Labs docs, see the [Content style guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md). | ||
--> | ||
|
||
## Checklist | ||
<!-- | ||
Uncomment if you're publishing docs for a prerelease version of dbt (delete if not applicable): | ||
Uncomment when publishing docs for a prerelease version of dbt: | ||
- [ ] Add versioning components, as described in [Versioning Docs](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-entire-pages) | ||
- [ ] Add a note to the prerelease version [Migration Guide](https://github.com/dbt-labs/docs.getdbt.com/tree/current/website/docs/docs/dbt-versions/core-upgrade) | ||
--> | ||
- [ ] Review the [Content style guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md) so my content adheres to these guidelines. | ||
- [ ] For [docs versioning](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#about-versioning), review how to [version a whole page](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version) and [version a block of content](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-blocks-of-content). | ||
- [ ] Add a checklist item for anything that needs to happen before this PR is merged, such as "needs technical review" or "change base branch." | ||
|
||
Adding new pages (delete if not applicable): | ||
- [ ] Add page to `website/sidebars.js` | ||
- [ ] Provide a unique filename for the new page | ||
|
||
Removing or renaming existing pages (delete if not applicable): | ||
- [ ] Remove page from `website/sidebars.js` | ||
- [ ] Add an entry `website/static/_redirects` | ||
- [ ] Run link testing locally with `npm run build` to update the links that point to the deleted page | ||
Adding or removing pages (delete if not applicable): | ||
- [ ] Add/remove page in `website/sidebars.js` | ||
- [ ] Provide a unique filename for new pages | ||
- [ ] Add an entry for deleted pages in `website/static/_redirects` | ||
- [ ] Run link testing locally with `npm run build` to update the links that point to deleted pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
title: "Set up MetricFlow" | ||
description: Getting started with the dbt and MetricFlow | ||
hoverSnippet: Learn how to get started with the dbt and MetricFlow | ||
pagination_next: "best-practices/how-we-build-our-metrics/semantic-layer-3-build-semantic-models" | ||
--- | ||
|
||
## Getting started | ||
|
@@ -13,9 +14,23 @@ git clone [email protected]:dbt-labs/jaffle-sl-template.git | |
cd path/to/project | ||
``` | ||
|
||
Next, before you start writing code, you need to install MetricFlow as an extension of a dbt adapter from PyPI (dbt Core users only). The MetricFlow is compatible with Python versions 3.8 through 3.11. | ||
Next, before you start writing code, you need to install MetricFlow: | ||
|
||
We'll use pip to install MetricFlow and our dbt adapter: | ||
<Tabs> | ||
|
||
<TabItem value="cloud" label="dbt Cloud"> | ||
|
||
- [dbt Cloud CLI](/docs/cloud/cloud-cli-installation) — MetricFlow commands are embedded in the dbt Cloud CLI. You can immediately run them once you install the dbt Cloud CLI. Using dbt Cloud means you won't need to manage versioning — your dbt Cloud account will automatically manage the versioning. | ||
|
||
- [dbt Cloud IDE](/docs/cloud/dbt-cloud-ide/develop-in-the-cloud) — You can create metrics using MetricFlow in the dbt Cloud IDE. However, support for running MetricFlow commands in the IDE will be available soon. | ||
|
||
</TabItem> | ||
|
||
<TabItem value="core" label="dbt Core"> | ||
|
||
- Download MetricFlow as an extension of a dbt adapter from PyPI (dbt Core users only). The MetricFlow is compatible with Python versions 3.8 through 3.11. | ||
- **Note**: You'll need to manage versioning between dbt Core, your adapter, and MetricFlow. | ||
- We'll use pip to install MetricFlow and our dbt adapter: | ||
|
||
```shell | ||
# activate a virtual environment for your project, | ||
|
@@ -27,13 +42,16 @@ python -m pip install "dbt-metricflow[adapter name]" | |
# e.g. python -m pip install "dbt-metricflow[snowflake]" | ||
``` | ||
|
||
Lastly, to get to the pre-Semantic Layer starting state, checkout the `start-here` branch. | ||
</TabItem> | ||
</Tabs> | ||
|
||
- Now that you're ready to use MetricFlow, get to the pre-Semantic Layer starting state by checking out the `start-here` branch: | ||
|
||
```shell | ||
git checkout start-here | ||
``` | ||
|
||
For more information, refer to the [MetricFlow commands](/docs/build/metricflow-commands) or a [quickstart](/guides) to get more familiar with setting up a dbt project. | ||
For more information, refer to the [MetricFlow commands](/docs/build/metricflow-commands) or the [quickstart guides](/guides) to get more familiar with setting up a dbt project. | ||
|
||
## Basic commands | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.