dbt-meshify icon indicating copy to clipboard operation
dbt-meshify copied to clipboard

account for `target` when `connect` ing via the source hack

Open dave-connors-3 opened this issue 1 year ago • 0 comments

When users declare sources in a downstream project to refer to models in an upstream project, most often the sources are hard coded to the production environment outputs of the upstream project.

For example if fct_orders in project_a is built into the analytics schema when running in production, project_b might have a source that looks like this:

sources:
  - name: src_proj_a
    database: project_a_prod_db
    schema: analytics
    tables:
      - name: fct_orders

The current method of interacting with LocalDbtProjects will simply compile each project with it's default target. If both local projects default to dev, project_a.fct_orders may have metadata that is different than the hardcoded source metadata, causing us to miss the connection.

let's think about how to resolve this!

dave-connors-3 avatar Apr 19 '23 20:04 dave-connors-3