title: How to select specific columns of multi-column join in sqlalchemy?
body: <p>We are testing the possibility to implement SQLAlchemy to handle our database work. In some instances I need to join a database to a clone of itself (with potentially different data, of course).</p>
  
  <p>An example of the SQL I need to replicate is as follows:</p>
  
  <pre><code>SELECT lt.name, lt.date, lt.type
  FROM dbA.dbo.TableName as lt
  LEFT JOIN dbB.dbo.TableName as rt
      ON lt.name = rt.name
      AND lt.date = rt.date
  WHERE rt.type is NULL
  </code></pre>
  
  <p>So far I have tried using the <code>join</code> object but I can't get it to not spit the entire join out. I have also tried various <code>.join()</code> methods based on the tutorial here: <a href="http://docs.sqlalchemy.org/en/rel_1_0/orm/tutorial.html" rel="nofollow">http://docs.sqlalchemy.org/en/rel_1_0/orm/tutorial.html</a> and I keep getting an AttributeError: "mapper" or not what I'm looking for.</p>
  
  <p>The issues I'm running into is that I need to not only join on multiple fields, but I can't have any foreign key relationships built into the objects or tables.</p>