Skip to content

Skip remote database engines when scanning materialized views - #803

Closed
alexsubota wants to merge 2 commits into
ClickHouse:mainfrom
alexsubota:fix/skip-remote-engines-in-mv-scans
Closed

alexsubota wants to merge 2 commits into
ClickHouse:mainfrom
alexsubota:fix/skip-remote-engines-in-mv-scans

Conversation

@alexsubota

@alexsubota alexsubota commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Relation listing no longer opens every MySQL, PostgreSQL, and MaterializedMySQL database engine while looking for materialized views. One unreachable remote database was failing the unfiltered system.tables scan for every model.
  • The associated-view lookup is limited to the model database.
  • source() on a remote schema still queries that schema directly.

Test plan

  • Run dbt against a server that has an unreachable MySQL database engine and confirm relation listing and materialized-view builds succeed for local databases.
  • Confirm a source() on a MySQL or PostgreSQL database engine still reads that schema.
  • Run the materialized view integration tests.

Made with Cursor


Note

Low Risk
Narrower SQL filters for catalog/MV discovery; behavior change is limited to avoiding failed remote connections, with remote source() still explicit.

Reviewed by Cursor Bugbot for commit a73cea7. Bugbot is set up for automated code reviews on this repo. Configure here.

alexsubota and others added 2 commits November 16, 2026 11:18
An unreachable MySQL database engine makes an unfiltered system.tables scan fail for every model. Limit the associated-view lookup to the model database, and restrict relation listing to local databases so source() on a remote schema still connects only to that schema.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@cla-assistant

cla-assistant Bot commented Nov 16, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ alexsubota
❌ alexandr-subota-idf
You have signed the CLA already but the status is still pending? Let us recheck it.

@alexsubota alexsubota closed this Nov 16, 2026
@alexsubota
alexsubota deleted the fix/skip-remote-engines-in-mv-scans branch November 16, 2026 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants