Skip to content

fix(clickhouse): strip virtual catalog from view sources - #5940

Open
mday-io wants to merge 1 commit into
SQLMesh:mainfrom
mday-io:mday/fix-clickhouse-create-view-catalog
Open

fix(clickhouse): strip virtual catalog from view sources#5940
mday-io wants to merge 1 commit into
SQLMesh:mainfrom
mday-io:mday/fix-clickhouse-create-view-catalog

Conversation

@mday-io

@mday-io mday-io commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • strip ClickHouse's configured virtual catalog from physical source tables in CREATE VIEW queries
  • preserve the caller's query expression and reject unexpected source catalogs

Why

The inherited catalog handling normalized the virtual view target but left synthetic three-part source names in the query. ClickHouse only accepts two-part database.table names, so gateway-managed virtual-layer promotion failed after creating the physical object.

Validation

  • make style
  • make fast-test
  • pytest tests/core/engine_adapter/test_clickhouse.py

Closes #5938

Signed-off-by: mday-io <mdaytn@gmail.com>
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.

ClickHouse virtual catalog is not stripped from CREATE VIEW source queries

1 participant