Skip to content

Commit

Permalink
Update pip install instructions in semantic-layer-2-setup.md (#4009)
Browse files Browse the repository at this point in the history
Adding double-quotes around the module name and extra information in
installation command to help guarantee success

## What are you changing in this pull request and why?
In the installation instructions for Metricflow
[here](https://docs.getdbt.com/guides/best-practices/how-we-build-our-metrics/semantic-layer-2-setup),
the instructions state:

```
source [virtual environment name]/bin/activate
# install dbt and MetricFlow
pip install dbt-metricflow[adapter name]
# e.g. dbt-metricflow[snowflake]
```

<img width="587" alt="image"
src="https://github.com/dbt-labs/docs.getdbt.com/assets/100031072/8430f4b8-6813-42e3-93b0-e291743b9a6c">

However, thesyntax for pip installation instructions with optional
extras should wrap the module and extras in double quotes:

```
pip install "dbt-metricflow[adapter name]"
```

This is guaranteed to run successfully, while the version without quotes
may not.

This also follows the convention in the Metricflow tutorial README.md
[here](https://github.com/tromsky/jaffle-sl-template)

<img width="552" alt="image"
src="https://github.com/dbt-labs/docs.getdbt.com/assets/100031072/b08f2613-1216-4927-83e4-6cabaf528fcd">

## Checklist
<!--
Uncomment if you're publishing docs for a prerelease version of dbt
(delete if not applicable):
- [ ] 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/guides/migration/versions)
-->
- [ ] Review the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md)
and [About
versioning](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version)
so my content adheres to these guidelines.
- [ ] 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`
- [ ] [Ran link
testing](https://github.com/dbt-labs/docs.getdbt.com#running-the-cypress-tests-locally)
to update the links that point to the deleted page
  • Loading branch information
mirnawong1 authored Sep 4, 2023
2 parents 9c8c1cc + 978b765 commit b6d7e97
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ We'll use pip to install MetricFlow and our dbt adapter:
python -m venv [virtual environment name]
source [virtual environment name]/bin/activate
# install dbt and MetricFlow
pip install dbt-metricflow[adapter name]
# e.g. dbt-metricflow[snowflake]
pip install "dbt-metricflow[adapter name]"
# e.g. pip install "dbt-metricflow[snowflake]"
```

Lastly, to get to the pre-Semantic Layer starting state, checkout the `start-here` branch.
Expand Down

0 comments on commit b6d7e97

Please sign in to comment.