Referencing the base table of a different model
メンテナーはふだん 4 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 52/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
調査の方向性
The issue points to the @resolve_template macro and the existing implementation for resolving the active model's base table, but names no source files or tests. Start by reading the implementation and tests for @resolve_template, then look for how other models are referenced. Done means a referenced model's base table can be retrieved without hardcoding its fingerprint.
索引モデルが issue の本文から書いたものです。
説明
I have added primary keys into my SQLMesh models using https://github.com/SQLMesh/sqlmesh/issues/4568 as a guide. The @resolve_template macro is really useful for creating the key on the base table rather than the view.
I would also like to add some foreign keys but I don't think it's possible to get the base table for a different model. For example, this works by hardcoding the referenced table but it will break if the referenced model is ever rebuilt with a different fingerprint:
@IF( @runtime_stage = 'creating', ALTER TABLE @SQL('@this_model') ADD CONSTRAINT @resolve_template('FK_@{table_name}_id') FOREIGN KEY (id) REFERENCES schema._table__fingerprint (id) )
Is it possible to retrieve the base table from a different model in the same way that @resolve_template does for the active model?
Thanks
- 主要言語
- Python
- スター
- 3.3k
- フォーク
- 471
- 平均マージ
- 6日 7時間
- マージ済み PR(30日)
- 35
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
SQLMesh/sqlmesh のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
SQLMesh/sqlmesh#6008 · コメント 1 件 ·
メンテナーはふだん 4 日以内に返信
-
VSCode Extension: SQLMesh LSP crashes on startup: ImportError: cannot import name 'WorkspaceDiagnosticRefreshRequest' with lsprotocol 2025.x対応中かも @boomesh11 が 15 日前に担当しました。 オープンBug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 4 日以内に返信
-
Improvement
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
SQLMesh/sqlmesh#5696 · コメント 6 件 ·
メンテナーはふだん 4 日以内に返信
SQLMesh/sqlmesh の issue をすべて見る
似ている issue
-
[BUG][Low–Medium] founder_numbers.py silently reads a SAFE discount or pool target given as a fraction (0.2) as 0.2%対応中かも @sumitkhond111-del が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
bmad-code-org/BMAD-METHOD#3358 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
open-mmlab/mmcv#3352 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
OpenGithubs/weekly#263 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
comp/cli P3 type/feature
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
NousResearch/hermes-agent#162784 ·
メンテナーはふだん 1 日以内に返信