z3z1ma / dbt-osmosis

Provides automated YAML management, a dbt server, streamlit workbench, and git-integrated dbt model output diff tools
https://z3z1ma.github.io/dbt-osmosis/
Apache License 2.0
422 stars 45 forks source link

Use identifier when available in yaml config to find relation in database #73

Closed Lawiss closed 5 months ago

Lawiss commented 1 year ago

Hello,

I have errors when running yaml refactor and relations have different name in database than the one in the yaml source/model config. Example of a source yaml config with an identifier :

version: 2
models: []
sources:
  - name: raw_zone_gsheet
    description: Tables qui proviennent de Google Sheet.
    tables:
      - name: collectivites
        identifier: coordonnees-epci-fp-2022-last

dbt-osmosis says Relation td-datawarehouse.raw_zone_gsheet.collectivites does not exist in target database, cannot resolve columns as it uses the value from the "name" key instead of the value from the "identifier" key. Is it possible to use the identifier if it is configured?