title: Pandas DataFrame to Hive Query for Insert
body: <p>My question is whether there is a way to generate a HiveQL with <code>insert</code> statement with X of columns and Y of rows into something like from Pandas' DataFrame object:</p>
  
  <pre><code>query = "INSERT INTO %s SELECT %s, %s, %s, %s, %s, %s, %s from " % (
      table_name, column_names[0], column_names[1], column_names[2], column_names[3], column_names[4], column_names[5], column_names[6])
  </code></pre>
  
  <p>I have the following dataframe as an example:</p>
  
  <pre><code>  metric predict_date         value        y_date      x_date  ... (many columns) 
  0  sales   2017-10-01  7.539010e+06   2016-06-01   2017-09-01
  1  sales   2017-11-01  8.364379e+06   2016-07-01   2017-09-01
  2  sales   2017-12-01  9.533355e+06   2016-08-01   2017-09-01
  .
  .
  .
  (many rows)
  </code></pre>
  
  <p>The use case here is just getting that query constructed.</p>
  
  <p><em>NOTE:</em> </p>
  
  <ul>
  <li>Pandas' <a href="https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.to_sql.html" rel="nofollow noreferrer">to_sql()</a> is actually writing to the SQL which I do not want for my use case.   </li>
  <li>I believe Spark is an option, but is there a quick-and-easy way to generate this as setting up Spark cluster takes time. :-)</li>
  </ul>