[Sqlalchemy-tickets] Issue #3716: SQLAlchemy not finding tables in two postgres separate schemas at
Brought to you by:
zzzeek
From: Alex P. <iss...@bi...> - 2016-05-18 09:49:02
|
New issue 3716: SQLAlchemy not finding tables in two postgres separate schemas at same time https://bitbucket.org/zzzeek/sqlalchemy/issues/3716/sqlalchemy-not-finding-tables-in-two Alex Petralia: SQLAlchemy version: **1.0.12** I originally raised this issue as a bug with `pandas` but I believe it is actually an issue with SQLAlchemy: https://github.com/pydata/pandas/issues/13210#issuecomment-219881388 I have a SQLAlchemy Engine object: ``` In[11]: SQLALCHEMY_CONN Out[11]: Engine(postgresql://***:***@***:***/***) ``` In the schema `a`, I have a table named `ads_skus` which has a foreign key reference to a table `sku` in the `public` schema. ``` In[12]: SQLALCHEMY_CONN.has_table('ads_skus', schema='a') Out[12]: True ``` SQLAlchemy can find the table in the same schema, but not the foreign table in the public schema: ``` In[13]: from sqlalchemy.schema import MetaData meta = MetaData(SQLALCHEMY_CONN, schema='a') meta.reflect(only=['ads_skus'], views=True) Out[13]: NoSuchTableError: sku ``` |