title: create table in phoenix from spark
body: <p>Hi I need to create a table in Phoenix from a spark job . I have tried 2 ways below but none of them work, seems this is still not supported.</p>
  
  <p>1) Dataframe.write still requires that the tables exists previously </p>
  
  <pre><code>df.write.format("org.apache.phoenix.spark").mode("overwrite").option("table", schemaName.toUpperCase + "." + tableName.toUpperCase  ).option("zkUrl", hbaseQuorum).save()
  </code></pre>
  
  <p>2) if we connect to phoenix thru JDBC, and try to execute the CREATE statemnt, then we get a parsing error (same create works in phoenix)</p>
  
  <pre><code>var ddlCode="create table test (mykey integer not null primary key, mycolumn varchar) "
  
  val driver = "org.apache.phoenix.jdbc.PhoenixDriver"
  val jdbcConnProps = new Properties()
  jdbcConnProps.setProperty("driver", driver);
  val jdbcConnString = "jdbc:phoenix:hostname:2181/hbase-unsecure"
  sqlContext.read.jdbc(jdbcConnString, ddlCode, jdbcConnProps)
  </code></pre>
  
  <p><strong>error:</strong>
  org.apache.phoenix.exception.PhoenixParserException: ERROR 601 (42P00): Syntax error. Encountered "create" at line 1, column 15.</p>
  
  <p>Anyone with similar challenges that managed to do it differently?</p>