Giter Club home page Giter Club logo

metricflow's Introduction

metricflow logo

Build and maintain all of your metric logic in code.


Welcome to MetricFlow

See our latest updates in the Metricflow Changelog!

MetricFlow is a semantic layer that makes it easy to organize metric definitions. It takes those definitions and generates legible and reusable SQL. This makes it easy to get consistent metrics output broken down by attributes (dimensions) of interest.

The name comes from the approach taken to generate metrics. A query is compiled into a query plan (represented below) called a dataflow that constructs metrics. The plan is then optimized and rendered to engine-specific SQL.



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

As a developer, you can also use MetricFlow's interfaces to construct APIs for integrations to bring metrics into downstream tools in your data stack.

To get up and running with your own metrics, you should rely on MetricFlow’s documentation available at MetricFlow docs.

Getting Started

Install MetricFlow

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

pip install metricflow

Once installed, MetricFlow can be setup and connected to a data warehouse by following the instructions after issuing the command:

mf setup

In case you don't have a connection to a data warehouse available and want a self-contained demo, DuckDB can be selected.

You may need to install Postgres or Graphviz. You can do so by following the install instructions for Postgres or Graphviz. 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:

mf tutorial

There are several examples of MetricFlow configs on common data sets in the config-templates folder. The tutorial will rely on a small set of sample configs.

Resources

Contributing and Code of Conduct

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

You might wish to read our code of conduct and engineering practices before diving in.

To get started on direct contributions, head on over to our contributor guide.

License

MetricFlow is open source software. The project relies on several licenses including AGPL-3.0-or-later and Apache (specified at folder level).

MetricFlow is built by Transform.

metricflow's People

Contributors

qmalcolm avatar tlento avatar williamdee avatar courtneyholcomb avatar jzhu13 avatar plypaul avatar jackckelly avatar belindabennett avatar lebca avatar jstein77 avatar kyleli626 avatar allegraholland avatar hesham-nawaz avatar rexledesma avatar nhandel avatar marcodamore avatar serramatutu avatar vviers avatar jpreillymb avatar alessandrolollo avatar alliehowe avatar andykram avatar zzsza avatar vvlu603 avatar yanghua avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.