Glue: GetTable/GetTables on a resource link read through to the target table - #10102
Open
Rishi943 wants to merge 1 commit into
Open
Glue: GetTable/GetTables on a resource link read through to the target table#10102Rishi943 wants to merge 1 commit into
Rishi943 wants to merge 1 commit into
Conversation
…t table Real AWS Glue merges schema/storage information (StorageDescriptor, PartitionKeys, TableType, Parameters) from the target table into the response when fetching a resource link, while keeping the link's own Name/DatabaseName/TargetTable. Moto previously returned only what was supplied at creation. If the target does not exist, the link is returned as-is. Fixes getmoto#8868 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Fixes #8868
Real AWS Glue reads through resource links:
GetTableon a table whose definition contains aTargetTablemerges schema/storage information from the target table into the response (see the Lake Formation docs on resource links), while keeping the link's ownName/DatabaseName/TargetTable. Moto previously returned only what was supplied at creation.This PR implements the read-through in
FakeTable.as_dict(), so it coversGetTable,GetTables, andGetTableVersion(s)in one place:StorageDescriptor,PartitionKeys,TableType, andParametersare merged from the target table (single hop — a link pointing at another link is not chased).Tests cover
GetTableon a link (merged schema +TargetTablepresent),GetTables, and a link with a missing target.