title: How to use Volatile Tables in Python Teradata module PyTD
body: <p>Does anyone know how to use volatile tables in the PyTd Teradata ODBC module? I can run single queries and get the results to return, but if I try to build a query with volatile tables, I keep getting an error. Any help? I'm fairly new to python.</p>
  
  <p>I'm using </p>
  
  <pre><code>udaExec = td.UdaExec (appName="dpull", version="1.0",logConsole=False)
  with udaExec.connect(method="ODBC",dsn="tdata", username="un", 
  password="pw") as session:
  
  query = """"
  create volatile table vol_table
  ,no fallback, no before journal, no after journal as 
      (
      select a, b, c
      from my_table1
      )
  with data primary index (a)
  on commit preserve rows
  
  Select vt.a, vt.b, vt.c, t2.a
  from vol_table vt
  inner join table2 t2
  on vt.anything = t2.anything
  """"
  df = pd.read_sql(query,session)
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code> `InterfaceError: ('SQL_INVALID_HANDLE', 'Invalid handle passed to SQLGetDiagRecW.')`
  </code></pre>