moto icon indicating copy to clipboard operation
moto copied to clipboard

[Glue] Read-through behavior of Resource Links in glue metastore

Open wimlewis-amazon opened this issue 7 months ago • 1 comments

Moto seems to behave differently from AWS Glue when calling GetTable on a resource-link.

What I observe: Moto returns a structure with TargetTable as expected, but without any schema/storage information (that is, it returns approximately what was sent in the Create/Update call).

What AWS does: The response includes some information from the target table as well (schema/storage at least). For some reason, the AWS documentation for this is under LakeFormation rather than Glue (I guess LF is the main use-case for resource links?). What appears to happen is:

  • When a client calls GetTable on a table that is a resource link, Glue issues a second GetTable call against the target table.
    • If that succeeds, it merges the target table's info into the response
    • If it fails, it swallows the error and just returns the link info itself, much like Moto does now.

wimlewis-amazon avatar May 01 '25 23:05 wimlewis-amazon

Hi @wimlewis-amazon, that is correct - our Glue-implementation does not interrogate target tables at all, it just returns what the user supplies. I'll mark it as an enhancement to implement the cross-service checks.

Do you happen to have an example test that shows what Moto is supposed to do?

bblommers avatar May 03 '25 10:05 bblommers