Plan fails with option --select-model after making a change

オープン
#5,818 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 4 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
半日
初心者へのやさしさ
65/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
clickhouse, python
領域
backend

調査の方向性

Examine how the --select-model flag resolves downstream dependencies in the planning phase. The error involves ClickHouse table fingerprinting, so focus on the snapshot management and model selection logic that determines which physical tables need recreation. Look for where downstream models are filtered out incorrectly when using selective planning, and verify the fingerprint-to-table mapping in the ClickHouse adapter.

索引モデルが issue の本文から書いたものです。

説明

Bug

I'm running the following command: uv run sqlmesh plan --select-model "ch_bronze_nz_stats.areas__regional_council_clipped" -vv after making changes to ch_bronze_nz_stats.areas__regional_council_clipped

And am getting:
Updating virtual layer ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸━━━ 92.3% • 24/26 • 0:00:01
Error: Execution failed for node SnapshotId<"ch_silver_geography"."geographic_area_shapes": 1549095793>

"ch_silver_geography"."geographic_area_shapes" is downstream of "ch_bronze_nz_stats.areas__regional_council_clipped"

When I inspect the logs I can see:
clickhouse_connect.driver.exceptions.DatabaseError: Received ClickHouse exception, code: 60, server response: Code: 60. DB::Exception: Unknown table expression identifier 'sqlmesh__ch_silver.ch_silver_geography__geographic_area_shapes__3267957768' in scope SELECT * FROM sqlmesh__ch_silver.ch_silver_geography__geographic_area_shapes__3267957768. (UNKNOWN_TABLE) (for url [redacted])
I have checked the database and can see that across all replicas sqlmesh__ch_silver.ch_silver_geography__geographic_area_shapes__3267957768 does not exist. So it seems the fingerprint for the downstream model has changed, but no physical table was created for it to match? I can see the old table in there sqlmesh__ch_silver.ch_silver_geography__geographic_area_shapes__3737929073

If I run the update without --select-model it works, but I had thought even with that option, downstream models that are indirectly affected, would update?

主要言語
Python
スター
3.3k
フォーク
471
平均マージ
6日 7時間
マージ済み PR(30日)
35

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

SQLMesh/sqlmesh のほかの issue

SQLMesh/sqlmesh の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。