I have the following experimental code running with SA 0.3.5 on Posgres (in order to figure out table relationships). The code always fails for one particular table, but works for 50 other tables:
def find_dependent_tables(dsn): d = {} db = create_engine(dsn)rs = db.engine.execute("select * from pg_tables where schemaname = 'public'")
for row in rs: tablename = row.tablename table = Table(tablename, db, autoload=True) print '-'*80 print table continue Department -------------------------------------------------------------------------------- Employees -------------------------------------------------------------------------------- GoogleAdWordsAnzeigen Traceback (most recent call last): File "find_referenced_tables.py", line 36, in ? d = find_dependent_tables('postgres://postgres:[EMAIL PROTECTED]/XXXX') File "find_referenced_tables.py", line 15, in find_dependent_tables table = Table(tablename, db, autoload=True)File "build/bdist.macosx-10.3-i386/egg/sqlalchemy/schema.py", line 142, in __call__ File "build/bdist.macosx-10.3-i386/egg/sqlalchemy/engine/base.py", line 526, in reflecttable File "build/bdist.macosx-10.3-i386/egg/sqlalchemy/databases/postgres.py", line 404, in reflecttable
KeyError: 'bit' Any idea? Andreas
pgpkjF1Lvp1lm.pgp
Description: PGP signature