Skip to content

Alerts config for source nodes defined in dbt_project.yml overrides the one defined in source.yml #2007

@ziga7631

Description

@ziga7631

Describe the bug
When creating dbt_sources (e.g. dbt run --target prod -d --select elementary.edr.dbt_artifacts.dbt_sources) wrong hierarchy order is applied when selecting source node meta.

alerts_config defined in dbt_project.yml overrides the one define in source.yaml... which shouldn't be the case. Meta should be used from source.yaml definition.

sources:
  project:
    +meta:
      alerts_config:
        channel: slack-channel
        owner: [ "@owner" ]
sources:
  - name: source
    schema: sourceSchema
    meta:
      alerts_config:
        channel: slack-channel
        owner:
          - "@owner"
    tables:
      - ...

To Reproduce
Specify default meta in dbt_project.yml. Override it inside source.yaml. Try removing the default one.

Expected behavior
alerts_config defined in dbt_project.yaml overrides the one define in source.yaml... which shouldn't be the case. Meta should be used from source.yaml definition.

Environment (please complete the following information):
dbt-core = "1.9.3"
dbt-bigquery = "1.9.0"
elementary-data = { version = "0.18.1", extras = ["bigquery"] }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions