feat: populate Glue table description from HMS comment parameter#139
Merged
jamespfaulkner merged 5 commits intoJul 1, 2026
Merged
Conversation
TableInput.description was never set during HMS→Glue sync, leaving table documentation invisible in the Glue Data Catalog UI. Now reads the table-level 'comment' TBLPROPERTY and maps it to the Glue description field, consistent with how database descriptions are already handled. Also extends GlueMetadataStringCleaner.cleanTable() to sanitise the description field so the ValidationException retry path is safe if the comment contains non-Unicode characters. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extend GlueMetadataStringCleaner to also clean the TableInput description field — removing non-Unicode characters and truncating to the Glue API limit of 2048 chars — so the ValidationException retry path is safe if a table comment contains invalid characters. Extracts cleanDescription() as a private method consistent with cleanColumns(). Also adds a test covering tables with parameters but no comment key. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tants for limits Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
String.repeat() requires Java 11+; GHA runs Java 8. Also fixes the pre-existing bug in generateCharString() which ignored its length param. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jmnunezizu
approved these changes
Jul 1, 2026
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.
Summary
TableInput.descriptionfield from the HMScommentTBLPROPERTY during sync, making table documentation visible in the AWS Glue Data Catalog UIDatabase.descriptiontoDatabaseInput.descriptionGlueMetadataStringCleaner.cleanTable()to sanitise the description field so theValidationExceptionretry path cannot fail on a non-Unicode table commentNotes
The
commentvalue will appear in bothdescriptionandparameters["comment"]on the Glue table — Glue treats these as separate fields and the redundancy is harmless.Test plan
HiveToGlueTransformerTest— table withcommentparam maps toTableInput.description; table withoutcommentparam producesnulldescriptionGlueMetadataStringCleanerTest— non-Unicode chars stripped from description in retry path;nulldescription handled safelymvn test -pl hive-event-listeners/apiary-gluesync-listener)🤖 Generated with Claude Code