dbt-labs / dbt-labs/metricflow

[SL-3391] [Bug] Allow meta in semantic model entities

Open
#1,604 2 comments 0 reactions 0 assignees View on GitHub
bug linear triage
Dominant language
Python
Stars
1.8k
Forks
202
Avg merge
1d 8h
Merged PRs (30d)
14

Description

### Is this a new bug in metricflow?

- [x] I believe this is a new bug in metricflow
- [x] I have searched the existing issues, and I could not find an existing issue for this bug

### Current Behavior

It's a dbt standard that any configurations also take the meta key. In case of semantic model entities, this does not work.
For example
```
semantic_models:
- name: dim_city
description: City dimension
model: ref('dim_city')
entities:
- name: city_id
type: primary
meta:
state: live
- name: country_id
type: foreign
```
will result in the following error:
```
Parsing Error
Invalid semantic_models config given in ... - at path ['entities'][0]: Additional properties are not allowed ('meta' was unexpected)
```

### Expected Behavior

Meta should be supported to enable the governance that dbt usually enables. Sample use cases might include adding business knowledge about the entity, ownership, domains etc.

### Steps To Reproduce

Try to add a meta key to an existing semantic model.

### Relevant log output

```shell

```

### Environment

```markdown
- OS:
- Python:
- dbt:
- metricflow:
```

### Which database are you using?

_No response_

### Additional Context

_No response_

[SL-3391](https://linear.app/dbt-labs/issue/SL-3391/[bug]-allow-meta-in-semantic-model-entities)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.