With SQLAlchemy metadata reflect() how do you get an actual table object?
<p>I'm just doing a bunch of selects on an existing DB.</p>
<ul>
<li>Don't want to use raw SQL as I may want to jump between MySQL and SQLite for testing</li>
<li>Want to stick to SQLAlchemy's SQL Expression language.</li>
</ul>
<p>I need to get a Table object so I do something like:</p>
<pre><code> s = select([some_table_object])
</code></pre>
<p>I've figured how to explicitly reflect a single table to get a table object:</p>
<pre><code>from sqlalchemy import *

conn = create_engine('mysql://....')
metadata = MetaData(conn)
mytable = Table('mytable', metadata, autoload=True)

s = select([mytable])
result = conn.execute(s)

# HAPPY!!!!
</code></pre>
<p>However, this gets tedious as you have to do it for each table (I go lots of tables).  I know I can somehow use the <code>MetaData</code> class to reflect the existing DB I'm connecting to, but I'm unsure of how to get the actual corresponding Table from the metadata.</p>
<pre><code>from sqlalchemy import *

conn = create_engine('mysql://....')

metadata = MetaData(conn)
metadata.reflect()

# How would do I get a Table instance corresponding to the 
# mytable table in the DB so I move on to HAPPY!!

mytable = metadata.no_clue_how_to_get_tables()

s = select([some_table_object])
result = conn.execute(s)
</code></pre>
<p>What's needed to replace the line <code>mytable = metadata.no_clue_how_to_get_tables()</code> to get a <code>Table</code> instance?</p>