title: R using RJDBC not writing data to Hive table
body: <p>RJDBC connecting to Hive fine and also reading the data from Hive. But it is not writing data to Hive using --> dbWriteTable.</p>
  
  <p>see below-</p>
  
  <pre><code>options(java.parameters = "-Xmx8g")
  library(DBI)
  library(rJava)
  library(RJDBC)
  
  cp &lt;- c(list.files("/tmp/R_hive_libs/cloudera_hive_jars", pattern = "[.]jar", full.names=TRUE, recursive=TRUE),list.files("/tmp/R_hive_libs/R_hadoop_libs", pattern = "[.]jar", full.names=TRUE, recursive=TRUE),list.files("/tmp/R_hive_libs/R_hadoop_libs/lib", pattern = "[.]jar", full.names=TRUE, recursive=TRUE), recursive=TRUE)
  
  drv &lt;- JDBC(driverClass = "com.cloudera.hive.jdbc4.HS2Driver", classPath=cp)
  conn &lt;- dbConnect(drv, "jdbc:hive2://XXXXXX:10000/default", "user", "password")
  show_databases &lt;- dbGetQuery(conn, "show databases")
  List_of_Tables &lt;- dbListTables(conn)
  
  data1 &lt;- dbGetQuery(conn, "select * from XXX.xxx limit 10000")
  data_to_write_back_to_hive &lt;- data.frame(aggregate(data1$xxx.xxx, by=list(Month=data1$xxx.cmp_created_timestamp_month), FUN=sum))
  data_to_write_back_to_hive[[2]] &lt;-c(10,20)
  colnames(data_to_write_back_to_hive) &lt;- c("Month", "Energy")
  dbWriteTable(conn, "xxxx.checking",data_to_write_back_to_hive)
  </code></pre>
  
  <p>How to write data back to hive? it is giving below error-</p>
  
  <blockquote>
    <p><strong>Error in .local(conn, statement, ...) :   execute JDBC update query failed in dbSendUpdate ([Simba]HiveJDBCDriver ERROR
    processing query/statement. Error Code: 40000, SQL state:
    TStatus(statusCode:ERROR_STATUS,
    infoMessages:[*org.apache.hive.service.cli.HiveSQLException:Error
    while compiling statement: FAILED: ParseException line 1:36 mismatched
    input 'PRECISION' expecting ) near 'DOUBLE' in create table
    statement:28:27,</strong>
    org.apache.hive.service.cli.operation.Operation:toSQLException:Operation.java:326,
    org.apache.hive.service.cli.operation.SQLOperation:prepare:SQLOperation.java:102,
    org.apache.hive.service.cli.operation.SQLOperation:runInternal:SQLOperation.java:171,
    org.apache.hive.service.cli.operation.Operation:run:Operation.java:268,
    org.apache.hive.service.cli.session.HiveSessionImpl:executeStatementInternal:HiveSessionImpl.java:410,
    org.apache.hive.service.cli.session.HiveSessionImpl:executeStatement:HiveSessionImpl.java:391,
    sun.reflect.GeneratedMethodAccessor56:invoke::-1,
    sun.reflect.DelegatingMeth</p>
  </blockquote>