semvec/pypi-packages huggingface dataset:
metricflow-to-zenlytic 0.1.5
Adapter for Metricflow to Zenlytic
License: MIT
Requires Python: <3.14,>=3.8.1
Keywords: Metrics Layer, Business Intelligence, Analytics

# Zenlytic Adapters

Utilities for converting semantic layer YAML files to Zenlytic's format.

## Steps for usage:
1. Run `pip install metricflow-to-zenlytic`
2. `$ metricflow_to_zenlytic [DIRECTORY]` from the command line, where `[DIRECTORY]` is the directory your `dbt_project.yml` file is in.

## Usage in Python

To run the function in python you can do so like this:

```
from metricflow_to_zenlytic.metricflow_to_zenlytic import (
    load_mf_project,
    convert_mf_project_to_zenlytic_project,
)

# Load the metricflow project
metricflow_project = load_mf_project(metricflow_folder)

# Convert to Zenyltic models and views
models, views = convert_mf_project_to_zenlytic_project(metricflow_project, "my_model", "my_company")

# Save as yaml files
out_directory = '/save/to/here/'
zenlytic_views_to_yaml(models, views, out_directory)

```

## Testing

`$ pytest`