Skip to content

feat(catalog): add column description support#1260

Open
tychtjan wants to merge 2 commits into
gooddata:masterfrom
tychtjan:feature/dx-312-column-descriptions
Open

feat(catalog): add column description support#1260
tychtjan wants to merge 2 commits into
gooddata:masterfrom
tychtjan:feature/dx-312-column-descriptions

Conversation

@tychtjan
Copy link
Copy Markdown
Contributor

Summary

Add optional description field to SqlColumn and CatalogDeclarativeColumn to support database column comments. This enables passing column descriptions from the scanModel API to LDM generation.

When databases like Snowflake have column comments defined (e.g., COMMENT ON COLUMN table.column IS 'description'), these are now captured during scanning and can be used as descriptions for facts, attributes, labels in the generated LDM.

Changes

  • Added description: Optional[str] = None field to SqlColumn class
  • Added description: Optional[str] = None field to CatalogDeclarativeColumn class
  • Added comprehensive tests for both classes

Testing

  • Unit tests added (14 new tests)
  • make format passes
  • All new tests pass on Python 3.12

Risk Assessment

  • Risk Level: low
  • Reason: Additive change only, new optional field with default None, fully backward compatible

Related

Checklist

  • Commit messages follow conventional commits format
  • No breaking changes

@hkad98 hkad98 closed this Mar 19, 2026
@hkad98 hkad98 reopened this Mar 19, 2026
tychtjan added 2 commits May 25, 2026 13:36
Add optional description field to SqlColumn and CatalogDeclarativeColumn
to support database column comments. This enables passing column
descriptions from scanModel API to LDM generation.

risk: low
jira: DX-312
Add comprehensive tests for SqlColumn and CatalogDeclarativeColumn
description field including:
- Creation with/without description
- API conversion (to_api/from_api)
- Equality comparison
- Integration with CatalogPdmSql

risk: nonprod
jira: DX-312
@tychtjan tychtjan force-pushed the feature/dx-312-column-descriptions branch from a5f81c1 to dbf442a Compare May 25, 2026 11:40
@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.05%. Comparing base (e1d6ad4) to head (dbf442a).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1260      +/-   ##
==========================================
+ Coverage   79.03%   79.05%   +0.01%     
==========================================
  Files         231      231              
  Lines       15634    15636       +2     
==========================================
+ Hits        12357    12361       +4     
+ Misses       3277     3275       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants