dbt-labs/dbt-docs

"Owner" field in docs site not getting populated as expected

sophiad96 opened this issue · 1 comments

Describe the bug

When the owner config is added to a .yml file in one's dbt project, it creates an entirely new "owner" field in the docs site, rather than populating the one that already exists.

Steps To Reproduce

Make sure you're on v1.4 or 1.5.

  1. Add the owner config (under the meta config) to either a source or model in a .yml file (examples here).

  2. Run dbt docs generate

  3. Open the docs site and navigate to the source/model. You'll notice that a new "owner" field appears at the top of the "Details" section, but the existing owner field under that (see screenshot) does not get populated.

Expected behavior

I would expect the existing "owner" field to get populated instead of an entirely new "owner" field being added.

Screenshots and log output

Screenshot 2023-05-18 at 11 37 29 AM

Further context here, if needed.

Thank you for opening this issue @sophiad96 and providing a nice write-up and visual aid!

This is actually behaving as expected. The difference you are seeing is between the meta config which acts as an "anything" drawer and the formal model owner that is inherited from the model's group (new in dbt v1.5).

Example...

models/_models.yml

groups:
  - name: my_group
    owner:
      name: my group owner
      email: eat@jaffle.shop

models:
  - name: my_model
    config:
      meta:
        owner:
          my meta owner
        something:
          else entirely
    group: my_group
    access: public

When you run dbt docs generate and dbt docs serve, you can see how these are displayed:

image

The solution in your case here would be to define the owner via the model's group instead of via the meta config.

Since this is behaving as expected, I'm going to close this.