Skip to content

feat: add docs config for sources#12646

Open
chinar-amrutkar wants to merge 2 commits intodbt-labs:mainfrom
chinar-amrutkar:fix/12023-source-docs-clean
Open

feat: add docs config for sources#12646
chinar-amrutkar wants to merge 2 commits intodbt-labs:mainfrom
chinar-amrutkar:fix/12023-source-docs-clean

Conversation

@chinar-amrutkar
Copy link

@chinar-amrutkar chinar-amrutkar commented Mar 11, 2026

Resolves #12023

Problem

The docs property is not working for sources. Currently, users cannot control show or set node_color for sources in dbt docs. This is problematic for users with medallion architecture (bronze > silver > gold) where sources can appear in multiple packages - they need to distinguish sources visually in the lineage graph.

Solution

This PR adds docs config support to sources:

  1. SourceConfig now includes a docs: Docs field (with show: bool and node_color: Optional[str]), matching the existing model configuration
  2. Catalog generation now pulls source description and includes it in the metadata comment, so descriptions are visible in dbt docs

Checklist

  • I have read the contributing guide and understand what's expected of me.
  • I have run this code in development, and it appears to resolve the stated issue.
  • I have run this PR includes tests, or tests are not required or relevant for this PR.
  • This PR has no interface changes (e.g., macros, CLI, logs, JSON artifacts, config files, adapter interface, etc.) or this PR has already received feedback and approval from Product or DX.
  • This PR includes type annotations for new and modified functions.

Add 'docs' config (show, node_color) support for sources.
This allows users to:
1. Control show/hide behavior in dbt docs for sources
2. Set node_color for source nodes in the lineage graph

Also adds source description to catalog metadata.

Fixes dbt-labs#12023
@chinar-amrutkar chinar-amrutkar requested a review from a team as a code owner March 11, 2026 21:59
@cla-bot cla-bot bot added the cla:yes label Mar 11, 2026
@github-actions
Copy link
Contributor

Additional Artifact Review Required

Changes to artifact directory files requires at least 2 approvals from core team members.

@github-actions github-actions bot added the community This PR is from a community member label Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla:yes community This PR is from a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Implement 'docs' config for sources

1 participant