Hey there, has anyone had any luck adding global o...
# community-support
a
Hey there, has anyone had any luck adding global owners to elementary alerts for sources in the
dbt_project.yml
file? For example, in my
dbt_project.yml
file, I have this but it did not work.
Copy code
sources:
  +meta:
    owner: "@alex.wong"
I've also tried this
Copy code
sources:
  subfolder:
    +meta:
      owner: "@alex.wong"
āœ… 1
n
Hey Alex! • Making sure that sources is at top level, with no indentation • Try adding + before the owner field Let me know if this helps šŸ™Œ
šŸ‘€ 1
a
Hey @Noya Offer thanks for getting back. Unfortunately none of these suggestions worked šŸ˜” I've tried the following and ensured that they are at the top level with no indentation
Copy code
sources:
  directory:
    subfolder:
      +meta:
        owner: "@alex.wong"
Copy code
sources:
  directory:
    subfolder:
      +meta:
        +owner: "@alex.wong"
šŸ‘€ 1
n
When looking at the dbt tree in the report, does the subfolder exist? Also, do you receive any warning on
dbt run
?
a
Hi @Noya Offer yes the subfolder exists and no I don't receive any warnings.
Here's what I've found so far. When I add the owner at the
tables:
level in the source .yml I am able to tag owners and it is working as expected.
Copy code
sources:
  - name: source_name
    database: db
    schema: schema
    tables:
      - name: orders
        loaded_at_field: last_modified
        freshness:
          warn_after: {count: 24, period: hour}
        meta:
          owner: "@alex.wong"
Knowing that, do you think something like this would work?
Copy code
sources:
  directory:
    subfolder:
      +tables:
        +meta:
          owner: "@alex.wong"
I believe I may have found the solution. I am going to do some more testing and come back with updates
n
Great! Waiting for your conclusion šŸ™‚
a
Hey Noya, here's the conclusion/solution! If you want to control the alert owners at the table level, this worked in the
source.yml
.
Copy code
sources:
  - name: source_name
    database: db
    schema: schema
    tables:
      - name: orders
        loaded_at_field: last_modified
        freshness:
          warn_after: {count: 24, period: hour}
        meta:
          owner: "@alex.wong"
If you want to apply it at the top level, this worked in the
dbt_project.yml
.
Copy code
sources:
  directory:
    subfolder:
      +meta:
        owner: "@alex.wong"
The reason why it wasn't working initially is because I was only running a
dbt source freshness
command, but per the documentation, the dbt artifacts are only updated by an on-run-end hook, which is only done after
dbt run / test / build
🫠
šŸ™Œ 1
n
@Alex Wong Thank you for sharing this! I'll add this to our docs.
šŸ™Œ 1