Repository navigation
fix: skip forcing absent catalog metadata columns to Text - #1749
Open
emrekabalcii wants to merge 3 commits into
Open
emrekabalcii wants to merge 3 commits into
emrekabalcii wants to merge 3 commits into
Conversation
Rows built by _get_columns_for_catalog omit None-valued keys, so comment, table_owner and table_comment are often missing from the table. Forcing them in build_type_tester made agate emit one RuntimeWarning per absent column per schema during dbt docs generate. Only force the columns that are present. Signed-off-by: Emre Kabalci <9528391+emrekabalcii@users.noreply.github.com>
emrekabalcii
requested review from
jprakash-db,
saishreeeee and
sd-db
as code owners
October 27, 2026 08:46
Signed-off-by: Emre Kabalci <9528391+emrekabalcii@users.noreply.github.com>
Author
|
Verified in a real dev workspace with
Two patched runs also produced identical |
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||
Co-authored-by: Isaac <no-reply@databricks.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #1748
Description
_get_schema_for_catalogforce-typed every name inCATALOG_TEXT_ONLY_COLUMNSas Text whenever the row list was non-empty. Rows come fromcolumn.to_column_dict(), which omitsNone-valued keys, socomment,table_ownerandtable_commentare often absent from the resulting table. agate then emits oneRuntimeWarningper absent forced column per schema duringdbt docs generate.This change builds the type tester only from the metadata columns that are present in the rows. The Text forcing from #1428 (which fixes the cross-schema merge conflict in #1392) is unchanged for every column that exists, and an empty input still falls back to
DEFAULT_TYPE_TESTER.Tests: added
test_get_schema_for_catalog__omitted_none_columns_emit_no_warnings, which uses rows without the None-valued keys (the real shape produced byto_column_dict) and turnsRuntimeWarninginto an error. It fails onmainand passes with this change. The existing_catalog_rowhelper includes"comment": None, which is why #1428's tests did not catch this. Full unit suite: 1466 passed, 4 skipped;ruff checkandruff format --checkclean. I did not run the functional/integration tests.Checklist
CHANGELOG.mdand added information about my change to the "dbt-databricks next" section.dbt-databricks-pr-readyproject skill for this PR and addressed its merge-readiness feedback