Skip to main content

prefect-metricflow

Welcome!

Collection of tasks to interact with MetricFlow

Getting Started

Python setup

Requires an installation of Python 3.8 or 3.9.

We recommend using a Python virtual environment manager such as pipenv, conda or virtualenv.

These tasks are designed to work with Prefect 2.0. For more information about how to use Prefect, please refer to the Prefect documentation.

Installation

Install prefect-metricflow with pip:

pip install prefect-metricflow

Write and run a flow

from prefect import flow
from prefect_metricflow.tasks import (
    materialize
)


@flow
def create_materialization_with_metricflow():
    return materialize(
        materialization_name="my_materialization",
        config={
            "dwh_dialect": "redshift",
            "dwh_host": "host",
            "dwh_port": 5439,
            "dwh_user": "dw_user",
            "dwh_password": "dw_pwd",
            "dwh_database": "dw_db",
            "dwh_schema": "dw_schema",
            "model_path": "path/to/models",
        }
    )

create_materialization_with_metricflow()


@flow
def drop_materialization_with_metricflow():
    return drop_materialization(
        materialization_name="my_materialization",
        config={
            "dwh_dialect": "redshift",
            "dwh_host": "host",
            "dwh_port": 5439,
            "dwh_user": "dw_user",
            "dwh_password": "dw_pwd",
            "dwh_database": "dw_db",
            "dwh_schema": "dw_schema",
            "model_path": "path/to/models",
        }
    )

drop_materialization_with_metricflow()

Resources

If you encounter any bugs while using prefect-metricflow, feel free to open an issue in the prefect-metricflow repository.

If you have any questions or issues while using prefect-metricflow, you can find help in either the Prefect Discourse forum or the Prefect Slack community.

Development

If you'd like to install a version of prefect-metricflow for development, clone the repository and perform an editable install with pip:

git clone https://github.com/AlessandroLollo/prefect-metricflow.git

cd prefect-metricflow/

pip install -e ".[dev]"

# Install linting pre-commit hooks
pre-commit install

Metadata

Release files for prefect-metricflow 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for prefect-metricflow 0.1.2
File Size Uploaded Provenance Actions
prefect-metricflow-0.1.2.tar.gz 25.8 kB Without provenance Details for prefect-metricflow-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for prefect-metricflow 0.1.2
File Interpreter ABI Platform Actions
prefect_metricflow-0.1.2-py3-none-any.whl Python 3 none any Details for prefect_metricflow-0.1.2-py3-none-any.whl

Total release size: 35.1 kB

Release files / prefect-metricflow-0.1.2.tar.gz

Download URL prefect-metricflow-0.1.2.tar.gz
Size 25.8 kB
Tags Source
SHA-256 checksum
How to use checksums
cce32fbc44f2fd2273400f48a875ca815fe59a853eaa06f14d84154bb157276b
BLAKE2b-256 checksum
How to use checksums
bfd52d355ecfa46c4ef4d4738ccde0a655b2e8119fb80afdf42c282791cedca9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / prefect_metricflow-0.1.2-py3-none-any.whl

Download URL prefect_metricflow-0.1.2-py3-none-any.whl
Size 9.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
551658b2d54c5b700cdab4f7b34c4c54f60d33971cda5d803ea31bfbd581a5ba
BLAKE2b-256 checksum
How to use checksums
bc303b4b79d83e81e208030b30ce13d2bcee75bfcf338a73c84f08e2a1d5eb3a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Security for prefect-metricflow 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page