I am wanting to have SQLAlchemy pull the table schema from the database.   I 
have just started trying to work through Essential SQLAlchemy and believe that 
I am using a syntax that is no longer supported in SQLAlchemy 0.6.6. This what 
I have tried:
from sqlalchemy import MetaData, create_engine, Table
meta = MetaData
engine1 = create_engine("mssql+pyodbc://mydsn")
valid_species_table = Table('tf_valid_species', meta, autoload = True, 
autoload_with = engine1)

I get a traceback that indicates MetaData does not have an attribute 'tables' 
(see below).  Thus far, though I expect it exists, I have not found anything 
comparable within the 0.6.6 documentation.

Where should I be looking?

Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/SQLAlchemy-0.6.6-py2.7.egg/sqlalchemy/schema.py",
 line 195, in __new__
    if key in metadata.tables:
AttributeError: type object 'MetaData' has no attribute 'tables'

R. Mark Sharp, Ph.D.
[email protected]<mailto:[email protected]>




-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to