Repository navigation
Conversation
Signed-off-by: Michael Day <mdaytn@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
ClickHouse
DataLakeCatalogexposes tables through a two-leveldatabase.tablenamespace, while SQLMesh source references can use three-levelcatalog.schema.tablenames. The newdatalake_catalog_mappingsetting maps a source catalog to a ClickHouse database. For example,datalake_catalog_mapping: {lake: iceberg}rewrites parsedlake.analytics.eventssources asiceberg."analytics.events"for reads, CTAS,INSERT ... SELECT, and replacement queries. The setting defaults to an empty mapping.Direct reads preserve unmapped foreign catalogs. With a mapping configured, materialization queries reject unconfigured catalogs. The integration test verifies that CTAS rejects an unknown source before creating its target. Mapping applies to parsed query sources. Raw SQL strings and
INSERTtargets are unchanged.create_viewstill rejects a mapped source when a virtual catalog is injected.Test Plan
DOCKER_CONTEXT=colima make clickhouse-datalake-upseeded three rows across two Iceberg snapshots on the local ARM64 stack.SQLMESH_RUN_CLICKHOUSE_DATALAKE=1 pytest -n 0 -m "docker and clickhouse_datalake" tests/core/engine_adapter/integration/test_integration_clickhouse_datalake.pypassed 19 cases with no skips. The run passed again after a cleanDOCKER_CONTEXT=colima make clickhouse-datalake-downandDOCKER_CONTEXT=colima make clickhouse-datalake-uprepeat.403 AccessDenied.make stylepassed all four hooks.make doc-testpassed 29 tests.PYTEST_XDIST_AUTO_NUM_WORKERS=4 make fast-testpassed 2,933 tests with 13 skipped.Checklist
make styleand fixed any issuesmake fast-test)git commit -s) per the DCO