title: Insert into temp table using SQLAlchemy
body: <p>I want to create a temp table from a result of CTE using SQLAlchemy.</p>
  <p>Tables definition:</p>
  <pre><code>class Data(Base):
    __tablename__ = 'data'
    c_id = Column(Integer, primary_key=True)
    # ...
  
  # temp table
  class CIdTmp(Base):
    __tablename__ = '#c_id_tmp'
    c_id = Column(Integer, primary_key=True) 
  </code></pre>
  <p>This is my CTE:</p>
  <pre><code>c_id_cte = (session.query(Data.c_id)).cte('c_id_cte')
  </code></pre>
  <p>I tried combining <code>insert()</code> with <code>from_select()</code> like this:</p>
  <pre><code>session.execute(CIdTmp.insert().from_select(['c_id'], c_id_cte))
  </code></pre>
  <p>But it produces this error:</p>
  <pre><code>AttributeError: type object 'CIdTmp' has no attribute 'insert'
  </code></pre>