title: How do I join two tables together that are in different databases, in Hive?
body: <p>A problem I've encountered a few times: I have a table, table1, in db1. I have table2 in db2. How do I join between the two?</p>
  
  <p>The obvious thing to do is something like:</p>
  
  <pre><code>SELECT *
  FROM db1.table1 INNER JOIN db2.table2
  ON db1.table1.field1 = db2.table2.field2;
  </code></pre>
  
  <p>Hive doesn't like this, however; it starts treating "table1" and "table2" as if they were column names, and "db1" and "db2" as table names, and complaining when they don't exist. How do I join between two tables in different databases?</p>