Metadata-Version: 2.1
Name: metricflow-to-zenlytic
Version: 0.1.5
Summary: Adapter for Metricflow to Zenlytic
Home-page: https://github.com/Zenlytic/zenlytic-adapters
License: MIT
Keywords: Metrics Layer,Business Intelligence,Analytics
Author: Paul Blankley
Author-email: paul@zenlytic.com
Requires-Python: >=3.8.1,<3.14
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: click (>=8.0,<9.0)
Requires-Dist: ruamel.yaml (>=0.17.20,<0.18.0)
Project-URL: Documentation, https://github.com/Zenlytic/zenlytic-adapters
Project-URL: Repository, https://github.com/Zenlytic/zenlytic-adapters
Description-Content-Type: text/markdown

# 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`

