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

Đang mở
#5,818 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 4 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
Nửa ngày
Mức phù hợp với người mới
65/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
clickhouse, python
Lĩnh vực
backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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?

Ngôn ngữ chính
Python
Star
3.3k
Fork
471
Merge trung bình
6 ngày 7 giờ
Pull request đã merge (30 ngày)
35

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của SQLMesh/sqlmesh

Tất cả issue của SQLMesh/sqlmesh

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.