Skip to content

fix(ingestion): improve Unity Catalog test-connection step quality - #28647

Merged
ulixius9 merged 4 commits into
mainfrom
uc-test-connection-step-quality
Jun 24, 2026
Merged

ulixius9 merged 4 commits into
mainfrom
uc-test-connection-step-quality

Conversation

@ulixius9

@ulixius9 ulixius9 commented Jun 2, 2026 •

Copy link
Copy Markdown
Member

Fixes #28862

Describe your changes:

Part of an internal Unity Catalog connector reliability audit (test-connection step quality cluster).

This PR fixes four issues in the Unity Catalog test connection flow:

  1. GetViews never actually validated views — it was bound to the same partial as GetTables. It now has its own get_views() step that filters tables.list() for VIEW / MATERIALIZED_VIEW table types.
  2. GetTables / GetViews silently no-oped when catalog/schema were unresolved — they now raise SourceConnectionException with an actionable message (pointing at USE CATALOG / USE SCHEMA privileges) so the step fails loudly instead of green-lighting a broken setup.
  3. Configured catalog / databaseSchema were ignored — GetDatabases and GetSchemas now validate access to the exact configured objects via catalogs.get() / schemas.get() instead of picking a random catalog/schema.
  4. CheckAccess error message assumed token auth and had typos ("validate to token", "hostport") — rewritten to be auth-agnostic.

The step functions were promoted from nested closures to module-level functions, mirroring the Databricks connector pattern and making them unit-testable.

Type of change:

  • Improvement

High-level design:

N/A — small change.

Tests:

Use cases covered

  • Test connection with a configured catalog / databaseSchema validates access to those exact objects
  • Test connection without configured catalog/schema falls back to the first non-internal catalog / first schema
  • GetTables / GetViews fail with a clear privilege message when catalog/schema resolution fails, instead of passing silently
  • GetViews validates view listing specifically (filters VIEW / MATERIALIZED_VIEW)

Unit tests

  • Files added/updated: ingestion/tests/unit/topology/database/test_unity_catalog_connection.py (12 new tests; 14 total in file)
  • All 83 Unity Catalog unit tests pass (test_unity_catalog*.py, test_unitycatalog*.py)

Backend integration tests

  • Not applicable (no backend API changes).

Ingestion integration tests

  • Not applicable (covered by unit tests; no ingestion workflow logic changed).

Playwright (UI) tests

  • Not applicable (no UI changes).

Manual testing performed

  • Pending: manual test connection against a live Unity Catalog workspace (will run before marking ready for review).

UI screen recording / screenshots:

Not applicable.

Checklist:

  • I have read the CONTRIBUTING document.

  • My PR title is Fixes <issue-number>: <short explanation>

  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.

  • I have commented on my code, particularly in hard-to-understand areas.

  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed — only testConnections/database/unitycatalog.json step descriptions/error messages changed; these are re-seeded on server startup, no migration needed.

  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

  • I have added tests around the new logic.

  • For connector/ingestion changes: I updated the documentation.

🤖 Generated with Claude Code

Greptile Summary

This PR fixes four correctness issues in the Unity Catalog test-connection flow: GetViews was wired to get_tables, configured catalog/schema were ignored in favour of random picks, GetTables/GetViews silently passed when catalog or schema could not be resolved, and the CheckAccess error message had typos and assumed token auth. The step functions are promoted from nested closures to module-level functions, and 12 new unit tests are added.

  • get_catalogs / get_schemas now call catalogs.get() / schemas.get() when a catalog or schema is configured, validating access to the exact configured object instead of falling back to a random one.
  • get_views has its own implementation that calls tables.list() and filters for VIEW/MATERIALIZED_VIEW types, capped at VIEW_LISTING_SCAN_LIMIT (100) objects to avoid pagination timeouts on large schemas.
  • _require_resolved_catalog_and_schema raises SourceConnectionException loudly when either value is unset, replacing the previous silent no-op.

Confidence Score: 5/5

Safe to merge — all changes are additive improvements to the test-connection flow with no impact on the ingestion runtime path.

The changes are well-scoped: four module-level functions replace nested closures, each with a clear contract. No ingestion runtime logic is touched. Twelve new unit tests cover the happy path, the configured-catalog/schema fast path, and all error branches. Two known concerns (silent pass on empty catalog list, combined error message when only one value is unresolved) are already tracked in prior review threads. No new defects are introduced by this PR.

No files require special attention beyond what is already noted in prior threads on connection.py.

Important Files Changed

Filename Overview
ingestion/src/metadata/ingestion/source/database/unitycatalog/connection.py Core logic change: four module-level step functions replace nested closures, adding configured-catalog/schema validation, loud failure on unresolved catalog/schema, and a dedicated view-listing path. One remaining concern from the review (silent pass in the unconfigured-catalog path when no non-internal catalog exists) is already tracked in prior threads.
ingestion/tests/unit/topology/database/test_unity_catalog_connection.py 12 new unit tests covering all four new step functions and the wiring test; scan-cap behaviour is verified by consuming the iterator after the call. Good coverage of the happy path and key error paths.
openmetadata-service/src/main/resources/json/data/testConnections/database/unitycatalog.json Minor text-only fix: CheckAccess error message corrected for typos and auth-agnostic phrasing; GetViews description changed from 'tables' to 'views'. No structural change.
ingestion/.basedpyright/baseline.json Removes a suppressed reportArgumentType baseline entry that was previously masking the pyright ignore comment on schemas.list(); type safety improved.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant TC as test_connection_steps
    participant GD as get_catalogs
    participant GS as get_schemas
    participant GT as get_tables
    participant GV as get_views
    participant SDK as WorkspaceClient

    TC->>GD: call(connection, table_obj, catalog?)
    alt catalog configured
        GD->>SDK: catalogs.get(catalog_name)
        SDK-->>GD: CatalogInfo
        GD->>GD: "table_obj.catalog_name = name"
    else no catalog configured
        GD->>SDK: catalogs.list()
        SDK-->>GD: iterator
        GD->>GD: pick first non-internal catalog
    end

    TC->>GS: call(connection, table_obj, schema?)
    alt catalog unresolved
        GS-->>TC: SourceConnectionException
    else schema configured
        GS->>SDK: schemas.get("catalog.schema")
        SDK-->>GS: SchemaInfo
        GS->>GS: "table_obj.schema_name = name"
    else no schema configured
        GS->>SDK: schemas.list(catalog_name)
        SDK-->>GS: iterator
        GS->>GS: pick first schema
    end

    TC->>GT: call(connection, table_obj)
    alt catalog or schema unresolved
        GT-->>TC: SourceConnectionException
    else both resolved
        GT->>SDK: "tables.list(catalog, schema, max_results=1)"
        SDK-->>GT: iterator
        GT->>GT: "table_obj.name = first table"
    end

    TC->>GV: call(connection, table_obj)
    alt catalog or schema unresolved
        GV-->>TC: SourceConnectionException
    else both resolved
        GV->>SDK: "tables.list(catalog, schema, max_results=100, omit_columns, omit_properties)"
        SDK-->>GV: iterator
        GV->>GV: scan ≤100 items, break on VIEW or limit
    end
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant TC as test_connection_steps
    participant GD as get_catalogs
    participant GS as get_schemas
    participant GT as get_tables
    participant GV as get_views
    participant SDK as WorkspaceClient

    TC->>GD: call(connection, table_obj, catalog?)
    alt catalog configured
        GD->>SDK: catalogs.get(catalog_name)
        SDK-->>GD: CatalogInfo
        GD->>GD: "table_obj.catalog_name = name"
    else no catalog configured
        GD->>SDK: catalogs.list()
        SDK-->>GD: iterator
        GD->>GD: pick first non-internal catalog
    end

    TC->>GS: call(connection, table_obj, schema?)
    alt catalog unresolved
        GS-->>TC: SourceConnectionException
    else schema configured
        GS->>SDK: schemas.get("catalog.schema")
        SDK-->>GS: SchemaInfo
        GS->>GS: "table_obj.schema_name = name"
    else no schema configured
        GS->>SDK: schemas.list(catalog_name)
        SDK-->>GS: iterator
        GS->>GS: pick first schema
    end

    TC->>GT: call(connection, table_obj)
    alt catalog or schema unresolved
        GT-->>TC: SourceConnectionException
    else both resolved
        GT->>SDK: "tables.list(catalog, schema, max_results=1)"
        SDK-->>GT: iterator
        GT->>GT: "table_obj.name = first table"
    end

    TC->>GV: call(connection, table_obj)
    alt catalog or schema unresolved
        GV-->>TC: SourceConnectionException
    else both resolved
        GV->>SDK: "tables.list(catalog, schema, max_results=100, omit_columns, omit_properties)"
        SDK-->>GV: iterator
        GV->>GV: scan ≤100 items, break on VIEW or limit
    end
Loading

Reviews (4): Last reviewed commit: "fix(ingestion): remove unused noqa direc..." | Re-trigger Greptile

@github-actions github-actions Bot added Ingestion safe to test Add this label to run secure Github workflows on PRs labels Jun 2, 2026
@ulixius9
ulixius9 force-pushed the uc-test-connection-step-quality branch from 9e9fd8e to f2369b1 Compare June 9, 2026 09:47
{
"name": "GetViews",
"description": "From a given schema, list the views belonging to that schema. If no schema is specified, we'll list the tables of a random schema.",
"description": "From a given schema, list the views belonging to that schema. If no schema is specified, we'll list the views of a random schema.",

@gitar-bot gitar-bot Bot Jun 9, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Quality: GetViews description still says 'random schema'

The GetViews step description in unitycatalog.json was updated (in this diff) to '...we'll list the views of a random schema.' but the resolution logic in get_schemas() actually picks the first schema returned by connection.schemas.list(...), not a random one. The same wording inaccuracy applies to the sibling GetTables/GetSchemas descriptions. Since this line was edited here, consider rewording to 'the first available schema' for accuracy. Low impact (user-facing description only).

Match the description to the actual first-schema resolution behavior.:

"description": "From a given schema, list the views belonging to that schema. If no schema is specified, we'll list the views of the first available schema.",

Was this helpful? React with 👍 / 👎

@ulixius9
ulixius9 marked this pull request as ready for review June 9, 2026 09:56
@ulixius9
ulixius9 requested a review from a team as a code owner June 9, 2026 09:56
Copilot AI review requested due to automatic review settings June 9, 2026 09:56
@github-actions

github-actions Bot commented Jun 9, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR checks passed

The linked issue has a description and all required Shipping project fields set. Thanks!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the Unity Catalog ingestion connector’s test-connection flow so that it validates the configured catalog/schema correctly, fails loudly with actionable errors when catalog/schema resolution fails, and properly separates the “GetViews” step from “GetTables”. It also promotes step functions to module-level for easier unit testing and adds unit coverage for the new behavior.

Changes:

  • Fix test-connection step wiring so GetViews uses a dedicated get_views() implementation (instead of reusing get_tables()), and GetDatabases/GetSchemas validate the configured catalog/schema via get().
  • Make GetTables/GetViews raise SourceConnectionException when catalog/schema aren’t resolved to avoid silent no-ops.
  • Update Unity Catalog test-connection definition messaging and add new unit tests + basedpyright baseline adjustment.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
openmetadata-service/src/main/resources/json/data/testConnections/database/unitycatalog.json Updates step error message and clarifies GetViews step description.
ingestion/src/metadata/ingestion/source/database/unitycatalog/connection.py Refactors test-connection steps into module-level functions; fixes GetViews wiring; adds explicit failure on unresolved catalog/schema.
ingestion/tests/unit/topology/database/test_unity_catalog_connection.py Adds unit tests for catalog/schema validation, unresolved failures, GetViews behavior, and test-connection wiring.
ingestion/.basedpyright/baseline.json Removes a resolved basedpyright baseline entry related to the updated typing/wiring.

ulixius9 added a commit that referenced this pull request Jun 9, 2026
Address Copilot review on PR #28647: get_views() only broke on finding a
view, so a schema with no views forced a full paginated tables.list scan
that could trip the overall test-connection timeout on large schemas.

Cap the scan at VIEW_LISTING_SCAN_LIMIT (100) items and request lightweight
listings (omit_columns/omit_properties). The step still validates that view
listing works and exposes view types without enumerating every object.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@ulixius9
ulixius9 requested a review from Copilot June 9, 2026 10:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

@github-actions

github-actions Bot commented Jun 9, 2026 •

Copy link
Copy Markdown
Contributor

🟡 Playwright Results — all passed (12 flaky)

✅ 4299 passed · ❌ 0 failed · 🟡 12 flaky · ⏭️ 88 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 301 0 1 4
🟡 Shard 2 810 0 2 9
🟡 Shard 3 810 0 3 8
🟡 Shard 4 855 0 2 12
🟡 Shard 5 730 0 3 47
🟡 Shard 6 793 0 1 8
🟡 12 flaky test(s) (passed on retry)
  • Pages/Roles.spec.ts › Roles page should work properly (shard 1, 1 retry)
  • Features/DataQuality/DataQuality.spec.ts › Column test case (shard 2, 1 retry)
  • Features/DataQuality/TestCaseImportExportE2eFlow.spec.ts › Admin: Complete export-import-validate flow (shard 2, 1 retry)
  • Features/KnowledgeCenterList.spec.ts › Knowledge Center List - Verify Recently Viewed widget (shard 3, 1 retry)
  • Features/Table.spec.ts › Table pagination with sorting should works (shard 3, 1 retry)
  • Features/Tasks/TaskNavigation.spec.ts › navigating to /table/TASK-XXXXX should show 404 (invalid URL pattern) (shard 3, 1 retry)
  • Pages/CustomProperties.spec.ts › Entity Reference (shard 4, 1 retry)
  • Pages/DataContracts.spec.ts › Create Data Contract and validate for DashboardDataModel (shard 4, 1 retry)
  • Pages/EntityDataConsumer.spec.ts › Tier Add, Update and Remove (shard 5, 1 retry)
  • Pages/EntityDataConsumer.spec.ts › Tier Add, Update and Remove (shard 5, 1 retry)
  • Pages/ExplorePageRightPanel_KnowledgeCenter.spec.ts › Should remove user owner for knowledgeCenter (shard 5, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

harshsoni2024
harshsoni2024 previously approved these changes Jun 10, 2026
ulixius9 added a commit that referenced this pull request Jun 16, 2026
Address Copilot review on PR #28647: get_views() only broke on finding a
view, so a schema with no views forced a full paginated tables.list scan
that could trip the overall test-connection timeout on large schemas.

Cap the scan at VIEW_LISTING_SCAN_LIMIT (100) items and request lightweight
listings (omit_columns/omit_properties). The step still validates that view
listing works and exposes view types without enumerating every object.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@ulixius9
ulixius9 force-pushed the uc-test-connection-step-quality branch from 6652d80 to dc92f49 Compare June 16, 2026 05:59
{
"name": "GetViews",
"description": "From a given schema, list the views belonging to that schema. If no schema is specified, we'll list the tables of a random schema.",
"description": "From a given schema, list the views belonging to that schema. If no schema is specified, we'll list the views of a random schema.",

@gitar-bot gitar-bot Bot Jun 16, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Quality: Step descriptions still say 'random schema' but code picks first

The GetTables (L27) and GetViews (L33) step descriptions both state "If no schema is specified, we'll list the ... of a random schema." This wording is inaccurate: the connection code (get_catalogs/get_schemas in connection.py) deterministically selects the first non-internal catalog and the first schema (not a random one), and now also validates an explicitly configured catalog/databaseSchema when provided. The previous review already flagged the GetViews description for this; the diff updated "tables" → "views" but kept the misleading "random". Suggest replacing "a random schema" with "the first available schema" (and similarly mention the configured catalog/schema), and applying the same fix to GetTables for consistency.

Replace 'random schema' with 'first available schema' in both GetTables and GetViews descriptions to match the actual selection logic.:

"description": "From a given schema, list the tables belonging to that schema. If no schema is specified, we'll list the tables of the first available schema.",
...
"description": "From a given schema, list the views belonging to that schema. If no schema is specified, we'll list the views of the first available schema.",

Was this helpful? React with 👍 / 👎

@github-actions

Copy link
Copy Markdown
Contributor

The Python checkstyle failed.

Please run make py_format and py_format_check in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Python code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

ulixius9 and others added 2 commits June 16, 2026 16:06
- Give GetViews its own validation function that filters for VIEW and
  MATERIALIZED_VIEW table types instead of reusing the GetTables partial
- Fail GetTables/GetViews loudly when the catalog/schema could not be
  resolved by previous steps, instead of silently passing
- Honor the configured catalog and databaseSchema in the GetDatabases and
  GetSchemas steps, validating access to those exact objects
- Rewrite the CheckAccess error message to be auth-agnostic and fix typos

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Address Copilot review on PR #28647: get_views() only broke on finding a
view, so a schema with no views forced a full paginated tables.list scan
that could trip the overall test-connection timeout on large schemas.

Cap the scan at VIEW_LISTING_SCAN_LIMIT (100) items and request lightweight
listings (omit_columns/omit_properties). The step still validates that view
listing works and exposes view types without enumerating every object.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings June 16, 2026 10:37
@ulixius9
ulixius9 force-pushed the uc-test-connection-step-quality branch from dc92f49 to 871dff7 Compare June 16, 2026 10:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown
Contributor

The Python checkstyle failed.

Please run make py_format and py_format_check in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Python code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

ulixius9 and others added 2 commits June 18, 2026 11:24
The # noqa: PLR1704 on the get_tags context manager was carried over from
the earlier standalone test_connection function, where 'connection' shadowed
a function parameter. In the class-based structure 'connection' is a local,
so PLR1704 never fires and ruff flags the directive as unused (RUF100).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings June 18, 2026 05:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@sonarqubecloud

Copy link
Copy Markdown

@ulixius9
ulixius9 enabled auto-merge (squash) June 24, 2026 05:36
@ulixius9
ulixius9 merged commit 91f7d3f into main Jun 24, 2026
56 checks passed
@ulixius9
ulixius9 deleted the uc-test-connection-step-quality branch June 24, 2026 05:39
@gitar-bot

gitar-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown
Code Review 👍 Approved with suggestions 0 resolved / 2 findings

Refactors Unity Catalog connection steps to properly validate configured catalogs and schemas and introduces explicit view validation. Please update the step descriptions for GetTables and GetViews to accurately reflect that they list the first available schema rather than a random one.

💡 Quality: GetViews description still says 'random schema'

📄 openmetadata-service/src/main/resources/json/data/testConnections/database/unitycatalog.json:33 📄 ingestion/src/metadata/ingestion/source/database/unitycatalog/connection.py:116-120

The GetViews step description in unitycatalog.json was updated (in this diff) to '...we'll list the views of a random schema.' but the resolution logic in get_schemas() actually picks the first schema returned by connection.schemas.list(...), not a random one. The same wording inaccuracy applies to the sibling GetTables/GetSchemas descriptions. Since this line was edited here, consider rewording to 'the first available schema' for accuracy. Low impact (user-facing description only).

Match the description to the actual first-schema resolution behavior.
"description": "From a given schema, list the views belonging to that schema. If no schema is specified, we'll list the views of the first available schema.",
💡 Quality: Step descriptions still say 'random schema' but code picks first

📄 openmetadata-service/src/main/resources/json/data/testConnections/database/unitycatalog.json:27 📄 openmetadata-service/src/main/resources/json/data/testConnections/database/unitycatalog.json:33

The GetTables (L27) and GetViews (L33) step descriptions both state "If no schema is specified, we'll list the ... of a random schema." This wording is inaccurate: the connection code (get_catalogs/get_schemas in connection.py) deterministically selects the first non-internal catalog and the first schema (not a random one), and now also validates an explicitly configured catalog/databaseSchema when provided. The previous review already flagged the GetViews description for this; the diff updated "tables" → "views" but kept the misleading "random". Suggest replacing "a random schema" with "the first available schema" (and similarly mention the configured catalog/schema), and applying the same fix to GetTables for consistency.

Replace 'random schema' with 'first available schema' in both GetTables and GetViews descriptions to match the actual selection logic.
"description": "From a given schema, list the tables belonging to that schema. If no schema is specified, we'll list the tables of the first available schema.",
...
"description": "From a given schema, list the views belonging to that schema. If no schema is specified, we'll list the views of the first available schema.",
🤖 Prompt for agents
Code Review: Refactors Unity Catalog connection steps to properly validate configured catalogs and schemas and introduces explicit view validation. Please update the step descriptions for GetTables and GetViews to accurately reflect that they list the first available schema rather than a random one.

1. 💡 Quality: GetViews description still says 'random schema'
   Files: openmetadata-service/src/main/resources/json/data/testConnections/database/unitycatalog.json:33, ingestion/src/metadata/ingestion/source/database/unitycatalog/connection.py:116-120

   The `GetViews` step description in `unitycatalog.json` was updated (in this diff) to '...we'll list the views of a random schema.' but the resolution logic in `get_schemas()` actually picks the *first* schema returned by `connection.schemas.list(...)`, not a random one. The same wording inaccuracy applies to the sibling `GetTables`/`GetSchemas` descriptions. Since this line was edited here, consider rewording to 'the first available schema' for accuracy. Low impact (user-facing description only).

   Fix (Match the description to the actual first-schema resolution behavior.):
   "description": "From a given schema, list the views belonging to that schema. If no schema is specified, we'll list the views of the first available schema.",

2. 💡 Quality: Step descriptions still say 'random schema' but code picks first
   Files: openmetadata-service/src/main/resources/json/data/testConnections/database/unitycatalog.json:27, openmetadata-service/src/main/resources/json/data/testConnections/database/unitycatalog.json:33

   The `GetTables` (L27) and `GetViews` (L33) step descriptions both state "If no schema is specified, we'll list the ... of a random schema." This wording is inaccurate: the connection code (`get_catalogs`/`get_schemas` in connection.py) deterministically selects the first non-internal catalog and the first schema (not a random one), and now also validates an explicitly configured `catalog`/`databaseSchema` when provided. The previous review already flagged the `GetViews` description for this; the diff updated "tables" → "views" but kept the misleading "random". Suggest replacing "a random schema" with "the first available schema" (and similarly mention the configured catalog/schema), and applying the same fix to `GetTables` for consistency.

   Fix (Replace 'random schema' with 'first available schema' in both GetTables and GetViews descriptions to match the actual selection logic.):
   "description": "From a given schema, list the tables belonging to that schema. If no schema is specified, we'll list the tables of the first available schema.",
   ...
   "description": "From a given schema, list the views belonging to that schema. If no schema is specified, we'll list the views of the first available schema.",

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

This branch was previously deployed

1 inactive deployment
test — b01aaefd Deployed Jun 18, 2026 by ulixius9 via playwright-ci-postgresql (5, 6) #51711
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ingestion safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unity Catalog test-connection GetViews step scans entire schema (unbounded), risking timeout on large schemas

3 participants