Repository navigation
Backport #31958 to 2.0: fix(glue): stop a custom databaseName dropping every schema - #32399
Conversation
* fix(glue): stop a custom databaseName dropping every schema
databaseName labels the OpenMetadata database, it does not name a Glue
catalog. Schema discovery compared it against the Glue Catalog ID, so a
custom name matched nothing and every schema was skipped while the run
still reported Success.
Skip that comparison when databaseName is set, since one name means one
database and every visible Glue database is one of its schemas. Warn when
that merges schemas from more than one catalog, so same-named schemas
colliding is visible rather than silent.
Also correct the connection schema description, which claimed the default
database name is "default" while the code uses the Glue Catalog ID.
* Update generated TypeScript types
* fix(glue): read a schema's tables from its own catalog
_get_glue_tables called get_tables with DatabaseName only, so it read from
the caller's default catalog. Now that a schema from another catalog can be
yielded, its tables would come back empty or belong to a same-named database
in the wrong catalog.
Stash each schema's Catalog ID as it is yielded and pass it to get_tables.
The default path is unaffected, since the database there already is the
caller's Catalog ID.
* fix(glue): ignore a missing Catalog ID when counting catalogs
GlueSchema.CatalogId is Optional, and adding it unguarded put None in the
set used for the merge warning. Sorting that set then raised TypeError
outside the per-schema try/except, so one database without a Catalog ID
aborted schema discovery for the whole service.
Track only non-empty Catalog IDs, reusing the guard the catalog map
already applies.
* test(glue): assert on the warning reason, not the dict repr
Status.warnings holds {key: reason} dicts, so asserting against str() of
the entry depended on dict formatting and never checked which database the
warning was about. Index by the database name instead, so a warning keyed
to the wrong entity fails.
* fix(glue): read Iceberg column detail from the schema's own catalog
get_columns fetched Iceberg table detail with DatabaseName only, so for a
schema discovered in another catalog the lookup resolved in the caller's
catalog and raised. The fallback below it then served the unfiltered
storage-descriptor columns, bringing dropped Iceberg columns back as live
ones with only a logged warning.
Pass CatalogId the same way _get_glue_tables does.
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
|
The Python checkstyle failed. Please run You can install the pre-commit hooks with |
Code Review ✅ ApprovedBackport of fix for Glue connector where setting a custom OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|



Backport of #31958 to 2.0.
Setting the Glue
databaseNameproduced a successful ingestion with zero schemas and zero tables.get_database_schema_namescompared that label against the Glue Catalog ID (the AWS account ID), so nothing ever matched, every schema was skipped, and the run still reported Success with no failures and no warnings.Cherry-picked from
311b17d0f2f. Original issue: open-metadata/openmetadata-collate#5942.Clean cherry-pick, no conflicts. Identical to main: 15 files, +208/-7.