dbt-labs / dbt-labs/agents_schema

DBT_MODEL should carry the physical relation name for aliased dbt models

Open
#41 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
48
Forks
4
PR merge metrics
No merged PRs in 30d

Description

#40 surfaced this: the dbt connector writes `node.name`, the logical model
name, to `AGENTS.DBT_MODEL`, and never `node.alias` or `node.relation_name`.
When a project sets `config(alias=...)`, the physical warehouse relation
differs from `name`, and the table `AGENTS.DBT_MODEL` points agents to does
not exist. The analyst skills resolve dbt models as `schema_name.name`, so
they hit this directly.

Proposal: add a nullable `alias` column to `DBT_MODEL` (or `relation_name`
for the full physical path) and have consumers use `coalesce(alias, name)`.
The change is additive, but it touches the SPEC.md table definition and
every destination writer, so we kept it out of #40.

Contributor guide

Open the contributing guide

Research direction

Start with the DBT_MODEL table definition in SPEC.md, then trace every destination writer and the analyst skills that resolve dbt models. Compare the available name, alias, and relation_name values for aliased models. Done means the schema, writers, and consumers consistently resolve the physical relation without breaking models that have no alias.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-engineering, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.