Model is missing but sqlmesh plan/run is successful

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

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

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

評価

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

調査の方向性

Start from the model state tracking logic to understand how SQLMesh determines if a model needs to be recreated. The issue is that patient_management.v_patient_insurance is not being recreated even though it doesn't exist in PostgreSQL. Look at the code that decides whether a model is 'missing' and needs recreation, and the view creation execution logic.

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

説明

Hi!

We have model patient_management.v_patient_insurance in sqlmesh but it's not created. Plan or Run, doesn't re-create etc and there is no error as well.

We can delete and then re-add it and it will be created but don't know why SQLMesh is not able to identify it.

SQL Error [42P01]: ERROR: relation "patient_management.v_patient_insurance" does not exist
  Position: 15

Error position: line: 1740 pos: 14
dotenvx run -- sqlmesh run --skip-janitor --ignore-cron --select-model="patient_management.v_patient_insurance"
⟐ injected env (1) from .env · [email protected]
[v1.0.0] Copy to blob: Object=dbo.vm_SaviPatientInsurance;Blob=;Container=reports-savi
[v1.0.0] Updating fields of table: Name="postgres"."sqlmesh__data_pipeline"."data_pipeline__ext_pt_ins__2065245981"
[v1.0.0] Analyzing table: Name="postgres"."sqlmesh__data_pipeline"."data_pipeline__ext_pt_ins__2065245981"
[1/1] data_pipeline.ext_pt_ins                   [full refresh]                             7.04s   
[1/1] data_pipeline.external_patient_insurance   [recreate view]                            2.92s   
[1/1] patient_management.v_patient_insurance     [recreate view]                            1.46s   
Executing model batches ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100.0% • 3/3 • 0:00:26                                                                                                                   
                                                                                                                                                                                                          
✔ Model batches executed

Run finished for environment 'prod'

Thanks

主要言語
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 を短くまとめたダイジェスト。