title: Python script to create sql query
body: <p>I have an excel sheet which is has columns COL_NAME, DATA_TYPE and DATA_FORMAT.
  I want to read that excel using panda and create a sql query to create a table.</p>
  <pre><code>|  COL_NAME   |  DATA_TYPE   |  DATA_FORMAT
  +-------------+--------------+--------------
  |   a         |  VARCHAR(20) |
  |   b         |  int         |
  |   c         |  TIMESTAMP   | YYYY-MM-DD
  |   d         |  int         |
  </code></pre>
  <p>Expecting output:</p>
  <pre><code>CREATE EXTERNAL table if not exist db1.table1_vw as 
  select cast(a as VARCHAR(20)) as a, cast(b as int) as b, 
         cast(from_unixtime(unix_timestamp(c, 'YYYY-MM-DD')) as timestamp) as c, 
         cast(d as int) as d from db1.table2;
  </code></pre>
  <p>Can someone please help?</p>