select table from other schema

前端 未结 1 1701
刺人心
刺人心 2020-12-11 01:37

I have a table from schema \"test\":

class AttributeConversion(Base):
    __tablename__ = \'test.attribute_conversion\'

How to select recor

1条回答
  •  失恋的感觉
    2020-12-11 02:02

    You can explicity specify a schema name for a table:

    class AttributeConversion(Base)
        __tablename__ = 'attribute_conversion'
        __table_args__ = {'schema' : 'test'}
    

    See documentation on specifying the schema name.

    0 讨论(0)
提交回复
热议问题