Allowing schema name to be specified for table construction

Issue #4127 new
Philip Martin
created an issue

I want to propose a change to the table expression class so it can accept a schema name in its constructor. I believe this is useful when building queries that are referencing table objects with different schema names. My proposed enhancement would follow the same convention used in the Table class by allowing for:

from sqlalchemy import column, table, MetaData, Table, Column, CHAR

# this currently generates a TypeError due to invalid keyword argument
t = table('bar', column('x'), schema='foo')

# same API as Table class
t = Table('bar', MetaData(), Column('x', CHAR(2), primary_key=True), schema='foo)

Comments (2)

  1. Log in to comment