How do I specify a catalog if I'm defining mutiple tables using the sqlalchemy ORM style?
還沒有人認領這個 Issue。
評估
研究方向
從 issue 中的 Foo 和 Bar 宣告式範例開始,追蹤它們的 schema 名稱和資料表名稱如何傳遞到 connector 的 catalog 設定。確認宣告式對映是否可以攜帶不同的 catalog,並定義查詢完整限定資料表時的預期行為。
由索引模型根據 Issue 內容生成。
描述
I have two tables I want to query from, the fully qualified names are foo_catalog.foo_schema.foo and bar_catalog.bar_schema.bar. I can specify a schema and a tablename in the table definition but I only get a chance to specify the catalog once in the connection.
How do I specify a catalog using declarative base style?
If I was writing raw sql I could query accross both catalogs no problem.
class Base(declarative_base(metaclass=DeclarativeABCMeta)):
__abstract__ = True
class Foo(Base):
__tablename__ = "foo"
__table_args__ = { "schema": "foo_schema"}
id: Mapped[int] = mapped_column(name="id", type_=INTEGER, primary_key=True)
class Bar(Base):
__tablename__ = "bar"
__table_args__ = { "schema": "bar_schema"}
id: Mapped[int] = mapped_column(name="id", type_=INTEGER, primary_key=True)
- 主要語言
- Python
- 星號
- 233
- 分支
- 152
- 平均合併
- 21 小時 5 分鐘
- 30 天內合併 PR
- 10
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
databricks/databricks-sql-python 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
-
難度 2/5 1-3 小時 新手友好度 76/100
-
難度 2/5 1-3 小時 新手友好度 78/100
-
難度 2/5 1-3 小時 新手友好度 72/100
-
難度 2/5 1-3 小時 新手友好度 84/100
查看 databricks/databricks-sql-python 的全部 Issue
相似的 Issue
-
essnmx good first issue
難度 1/5 1 小時以內 新手友好度 95/100
-
難度 2/5 1-3 小時 新手友好度 65/100
syfoud/Simulated_Scepter#174 ·
-
難度 2/5 1-3 小時 新手友好度 75/100
Giskard-AI/giskard-oss#2840 · 1 則留言 ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success 未關閉area: repo bug perceived difficulty: 2
難度 2/5 1-3 小時 新手友好度 70/100
-
難度 2/5 1-3 小時 新手友好度 75/100
yeti-platform/yeti#1380 ·