Repository navigation
Preserve dbt semantic entity metadata in Analytics discovery - #7363
Conversation
Visual recap — readback failedThe recap was published, but the workflow could not verify it. Screenshot capture was skipped. Open the interactive recap directly: Open the full interactive recap Diagnostic: Published recap readback failed: get-visual-plan returned HTTP 403; the configured token cannot read this published recap |
There was a problem hiding this comment.
Builder reviewed your changes and has a few items to flag 🟡
Review Details
Incremental Code Review Summary
The update addresses the prior review finding: when the top-level primary_entity is omitted, the index now falls back to the declared typed primary entity's name, while retaining the entity expression separately for grain and definition text. The added regression test covers this case. I resolved the previous review thread after verifying that behavior in the updated diff.
New finding
- LOW — Potential metadata mismatch if declarations conflict: If a dbt model supplies both a top-level
primary_entityand a typedtype: primaryentity with different names, the index uses the top-level value forprimaryEntitybut the typed entity's expression for grain/definition. This is an unusual input, and I did not find evidence it is a supported or valid dbt combination, so it is non-blocking.
The PR remains standard risk. The intended behavior of not inferring grain from an entity name is consistent with the stated change; the claim that top-level primary_entity alone should produce grain is not a confirmed issue here because no primary-entity expression is present. 🧪 Browser testing: Skipped — only source-index generation, tests, and changelog files changed; no browser-facing UI behavior is affected.
Summary
primary_entityin the generated Analytics source index and metric entries.Validation
pnpm --filter analytics exec vitest run scripts/build-source-index.spec.ts(13 passed)pnpm --filter analytics typecheckpnpm guards(89 passed)git diff --checkNo dbt definitions, production rows, or credentials were changed.