title: How to specify the database when registering a data frame to a table in Spark1.6
body: <p>I am working on a simple Spark script, and running into issues putting data where I want to, and getting the job to work.  Specifically, I need to specify the database of the tables when registering a data frame to a temp table.  </p>
  
  <pre><code>    df_del_records,df_add_records,df_exclusion_records=get_new_records(dff)
      df_del_records.registerTempTable("db.update_deletes_temp_table")
      df_add_records.registerTempTable("db.update_adds_temp_table")
      df_exclusion_records.registerTempTable("db.exclusions_temp_table")
      sqlContext.sql("insert overwrite table db.automated_quantity_updates select * from db.update_deletes_temp_table")
      sqlContext.sql("insert into table db.automated_quantity_updates select * from db.update_adds_temp_table")
      sqlContext.sql("insert into table db.exclusions select * from db.exclusions_temp_table")
  </code></pre>
  
  <p>The code above runs without errors, but does not yield any results.  Removing the database yields results, but that won't work in production where the database in which the temp tables have to be stored is not whatever default Spark is using.  How do I specify which database a temp table needs to be in registering a datagrame to a temp table in Spark 1.6?</p>