Metadata-Version: 2.4
Name: metricflow-klook_data
Version: 0.209.0.dev3
Summary: Translates a simple metric definition into reusable SQL and executes it against the SQL engine of your choice.
Project-URL: Documentation, https://docs.getdbt.com/docs/build/about-metricflow
Project-URL: Source Code, https://github.com/dbt-labs/metricflow
Author: dbt Labs
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: <3.13,>=3.9
Requires-Dist: dbt-semantic-interfaces==0.9.4.dev0
Requires-Dist: graphviz<0.21,>=0.18.2
Requires-Dist: jinja2<3.7.0,>=3.1.0
Requires-Dist: more-itertools<11.0.0,>=10.0.0
Requires-Dist: pydantic<3.0,>=1.10.0
Requires-Dist: python-dateutil<2.10.0,>=2.8.0
Requires-Dist: rapidfuzz<4.0,>=3.0
Requires-Dist: tabulate>=0.8.9
Requires-Dist: typing-extensions<5.0,>=4.4
Provides-Extra: dev-env-requirements
Requires-Dist: black<24,>=23.3; extra == 'dev-env-requirements'
Requires-Dist: click>=8.1.6; extra == 'dev-env-requirements'
Requires-Dist: dbt-core<1.11.0,>=1.10.4; extra == 'dev-env-requirements'
Requires-Dist: dbt-duckdb<1.9.0,>=1.8.0; extra == 'dev-env-requirements'
Requires-Dist: duckdb!=1.2.1,<1.4.0; extra == 'dev-env-requirements'
Requires-Dist: halo<0.1.0,>=0.0.31; extra == 'dev-env-requirements'
Requires-Dist: httpx<0.25,>=0.24; extra == 'dev-env-requirements'
Requires-Dist: hypothesis<7,>=6.87; extra == 'dev-env-requirements'
Requires-Dist: isort<6,>=5.12; extra == 'dev-env-requirements'
Requires-Dist: mypy<1.8.0,>=1.7.0; extra == 'dev-env-requirements'
Requires-Dist: pre-commit<3.3.0,>=3.2.2; extra == 'dev-env-requirements'
Requires-Dist: pydantic<2,>=1.10; extra == 'dev-env-requirements'
Requires-Dist: pympler<=2.0,>=1.1; extra == 'dev-env-requirements'
Requires-Dist: pytest-mock<3.15.0,>=3.14.0; extra == 'dev-env-requirements'
Requires-Dist: pytest-xdist<3.7.0,>=3.6.0; extra == 'dev-env-requirements'
Requires-Dist: pytest<9.0.0,>=8.0.0; extra == 'dev-env-requirements'
Requires-Dist: pyyaml<7.0.0,>=6.0; extra == 'dev-env-requirements'
Requires-Dist: tabulate>=0.8.9; extra == 'dev-env-requirements'
Requires-Dist: termcolor<4.0,>=3.0; extra == 'dev-env-requirements'
Requires-Dist: types-jinja2<3,>=2.11; extra == 'dev-env-requirements'
Requires-Dist: types-jsonschema<5,>=4.17; extra == 'dev-env-requirements'
Requires-Dist: types-python-dateutil; extra == 'dev-env-requirements'
Requires-Dist: types-pyyaml; extra == 'dev-env-requirements'
Requires-Dist: types-tabulate; extra == 'dev-env-requirements'
Requires-Dist: update-checker<0.19.0,>=0.18.0; extra == 'dev-env-requirements'
Description-Content-Type: text/markdown

<p align="center">
  <a target="_blank" href="https://transform.co/metricflow">
    <picture>
      <img  alt="metricflow logo" src="https://github.com/dbt-labs/metricflow/raw/main/assets/MetricFlow_logo.png" width="auto" height="120">
    </picture>
  </a>
  <br /><br />
  <b>Build and maintain all of your metric logic in code.</b>
  <br /><br />
  <a target="_blank" href="https://twitter.com/dbt_labs">
    <img src="https://img.shields.io/twitter/follow/dbt_labs?labelColor=image.png&color=163B36&logo=twitter&style=flat">
  </a>
  <a target="_blank" href="https://www.getdbt.com/community/">
    <img src="https://img.shields.io/badge/Slack-join-163B36">
  </a>
  <a target="_blank" href="https://github.com/dbt-labs/metricflow">
    <img src="https://img.shields.io/github/stars/dbt-labs/metricflow?labelColor=image.png&color=163B36&logo=github">
  </a>
  <br />
  <a target="_blank" href="https://github.com/dbt-labs/metricflow/blob/master/LICENSE">
    <img src="https://img.shields.io/pypi/l/metricflow?color=163B36&logo=AGPL-3.0">
  </a>
  <a target="_blank" href="https://pypi.org/project/metricflow/">
    <img src="https://img.shields.io/pypi/v/metricflow?labelColor=&color=163B36">
  </a>
  <img src="https://img.shields.io/pypi/pyversions/metricflow?labelColor=&color=163B36">
</p>

# Welcome to MetricFlow

See our latest updates in the [Metricflow Changelog](https://github.com/dbt-labs/metricflow/blob/main/CHANGELOG.md)!

MetricFlow is a semantic layer that simplifies defining and managing metrics. It compiles these metric definitions into clear, reusable SQL, ensuring consistent and accurate results when analyzing data by relevant attributes (dimensions).

The name “MetricFlow” reflects its approach: metric requests are compiled into a dataflow-based query plan, which is then optimized and translated into engine-specific SQL.


<p align="center">
<img src="https://github.com/dbt-labs/metricflow/raw/main/assets/example_plan.svg" height="500"/>
<br /><br />
</p>

MetricFlow provides a set of abstractions that help you construct complicated logic and dynamically generate queries to handle:

- Multi-hop joins between fact and dimension sources
- Complex metric types such as ratio, expression, and cumulative
- Metric aggregation to different time granularities
- And so much more

To get up and running with your own metrics, you should rely on [MetricFlow’s documentation](https://docs.getdbt.com/docs/build/build-metrics-intro).

## Licensing

MetricFlow is distributed under the Apache 2.0 license. For details, please refer to our [licensing agreement](https://github.com/dbt-labs/metricflow/blob/main/LICENSE).

## Open Semantic Interchange (OSI) Initiative

MetricFlow is developed and maintained as part of the [Open Semantic Interchange (OSI) initiative](https://www.snowflake.com/en/blog/open-semantic-interchange-ai-standard/). The OSI initiative is a collaborative effort among leading technology companies and data practitioners to establish a open standard for defining and exchanging semantic information, enabling AI/BI interoperability across different platforms and tools. 

## Getting Started

### Install MetricFlow

MetricFlow can be installed from PyPi for use as a Python library with the following command:

```
pip install dbt-metricflow
```

MetricFlow currently serves as a query compilation and SQL rendering library, built to work in conjunction with a dbt project. As such, using MetricFlow requires a working dbt project and a dbt adapter. We provide the `dbt-metricflow` bundle for this purpose. You may choose to install other adapters as optional extras from dbt-metricflow.

You may need to install Postgres or Graphviz. You can do so by following the install instructions for [Postgres](https://www.postgresql.org/download/) or [Graphviz](https://www.graphviz.org/download/). Mac users may prefer to use brew: `brew install postgresql` or `brew install graphviz`.

### Tutorial

The best way to get started is to follow the tutorial steps, which you can access by running:

```
mf tutorial
```

Note: this must be run from a dbt project root directory.

## Resources

- [Website](https://transform.co/metricflow)
- [Documentation](https://docs.getdbt.com/docs/build/build-metrics-intro)
- [Slack Community](https://www.getdbt.com/community/)
- [MetricFlow Git Repository](https://github.com/dbt-labs/metricflow)
- [CHANGELOG.md](https://github.com/dbt-labs/metricflow/blob/main/CHANGELOG.md)
- [TENETS.md](https://github.com/dbt-labs/metricflow/blob/main/TENETS.md)

## Contributing and Code of Conduct

This project will be a place where people can easily contribute high-quality updates in a supportive environment.

Please read our [code of conduct](https://docs.getdbt.com/community/resources/code-of-conduct) before diving in.

To get started on direct contributions, head on over to our [contributor guide](https://github.com/dbt-labs/metricflow/blob/main/CONTRIBUTING.md).

## License History

MetricFlow is source-available software.

Version 0 to 0.140.0 was covered by the Affero GPL license.
Version 0.150.0 to 0.208.2 was covered by the BSL license.
Version 0.209.0 and greater is covered by the Apache 2.0 license.

MetricFlow is built by [dbt Labs](https://www.getdbt.com/).
