Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Support for meta in Dimensions, Entities, and Measures #362

Open
3 tasks done
DevonFulcher opened this issue Nov 5, 2024 · 1 comment
Open
3 tasks done
Assignees
Labels

Comments

@DevonFulcher
Copy link
Contributor

Is this your first time submitting a feature request?

  • I have read the expectations for open source contributors
  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward change to existing dbt-semantic-interfaces functionality, rather than a Big Idea better suited to a discussion

Describe the feature

Dimensiona, Entities, and Measures should have meta config like other dbt resources https://docs.getdbt.com/reference/resource-configs/meta.

Describe alternatives you've considered

No response

Who will this benefit?

This will provide consistency across dbt resources.

Are you interested in contributing this feature?

Yes.

Anything else?

I have already started on this here. The biggest open question is how to implement combining configs, such as here https://docs.getdbt.com/reference/configs-and-properties#combining-configs. This behavior is a bit confusing to me and there may be a problem with our docs our a bug in the implementation. For example, In this case, there is no meta_location_1 in the manifest:

sources:
  - name: source_1
    config:
      meta: {"meta_location": "source level1", "meta_location_1": "source level2"}

    tables:
      - name: table_1
        config:
          meta: {"meta_location": "table level3", "meta_location_2": "table level4"}

However, in this case there is:

sources:
  - name: source_1
    config:
      meta: {"meta_location": "source level1", "meta_location_1": "source level2"}

    tables:
      - name: table_1

So, it looks like these meta dictionaries aren't being merged as described in the docs.

@DevonFulcher DevonFulcher self-assigned this Nov 5, 2024
@Jstein77
Copy link

@DevonFulcher I think we can move forward with the behavior described in the docs and open a core issue to fix the "clobbering" behaviour. How does that sound?

DevonFulcher added a commit that referenced this issue Nov 12, 2024
### Description

This PR implements the meta config merge behavior described
[here](https://docs.getdbt.com/reference/configs-and-properties#combining-configs)
and referenced
[here](#362).

I decided to stack this PR on top to keep it distinct from the other
PRs, but I don't intend to merge this one into main directly. I will
merge it into its parent branch first.

### Checklist

- [x] I have read [the contributing
guide](https://github.com/dbt-labs/dbt-semantic-interfaces/blob/main/CONTRIBUTING.md)
and understand what's expected of me
- [x] I have signed the
[CLA](https://docs.getdbt.com/docs/contributor-license-agreements)
- [x] This PR includes tests, or tests are not required/relevant for
this PR
- [ ] ~~I have run `changie new` to [create a changelog
entry](https://github.com/dbt-labs/dbt-semantic-interfaces/blob/main/CONTRIBUTING.md#adding-a-changelog-entry)~~
I'm not going to merge this directly into main, so we don't need a
separate changelog entry.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants