Skip to content

Commit

Permalink
Update metricflow-commands.md
Browse files Browse the repository at this point in the history
add versionblocks and update syntax based on versions. 

raised in [internal slack thread](https://dbt-labs.slack.com/archives/C02NCQ9483C/p1729633657302969)
  • Loading branch information
mirnawong1 authored Oct 23, 2024
1 parent c40023c commit ed82892
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions website/docs/docs/build/metricflow-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,22 @@ For dbt Cloud CLI users, MetricFlow commands are embedded in the dbt Cloud CLI,

You can install [MetricFlow](https://github.com/dbt-labs/metricflow#getting-started) from [PyPI](https://pypi.org/project/dbt-metricflow/). You need to use `pip` to install MetricFlow on Windows or Linux operating systems:

<VersionBlock lastVersion="1.7">

1. Create or activate your virtual environment `python -m venv venv`
2. Run `pip install dbt-metricflow`
* You can install MetricFlow using PyPI as an extension of your dbt adapter in the command line. To install the adapter, run `python -m pip install "dbt-metricflow[your_adapter_name]"` and add the adapter name at the end of the command. For example, for a Snowflake adapter run `python -m pip install "dbt-metricflow[snowflake]"`

</VersionBlock>

<VersionBlock firstVersion="1.8">

1. Create or activate your virtual environment `python -m venv venv`
2. Run `pip install dbt-metricflow`
* You can install MetricFlow using PyPI as an extension of your dbt adapter in the command line. To install the adapter, run `python -m pip install "dbt-metricflow[adapter_package_name]"` and add the adapter name at the end of the command. For example, for a Snowflake adapter run `python -m pip install "dbt-metricflow[dbt-snowflake]"`

</VersionBlock>

**Note**, you'll need to manage versioning between dbt Core, your adapter, and MetricFlow.

Something to note, MetricFlow `mf` commands return an error if you have a Metafont latex package installed. To run `mf` commands, uninstall the package.
Expand Down

0 comments on commit ed82892

Please sign in to comment.