将R data.frame数据插入HIVE DB

时间:2018-01-24 18:16:06

标签: r hive

我有一个包含1000-2000条记录的data.frame。我正在使用RJDBC插入HIVE并按照以下步骤进行操作但我收到错误

library(RJDBC)
drv <- JDBC(driverClass = "org.apache.hive.jdbc.HiveDriver", classPath = list.files("C:/R 
Install/hive_lib",pattern="jar$",full.names=T),identifier.quote="'")
conn <- dbConnect(drv,  "servername", "username", "pwd")

dbWriteTable(conn, name = tablename, value = data.frame, row.names = FALSE)

错误:

Error in .local(conn, statement, ...) : 
  execute JDBC update query failed in dbSendUpdate (Error while compiling statement: FAILED: ParseException line 1:334 mismatched input 'PRECISION' expecting ) near 'DOUBLE' in create table statement)

将R数据框记录插入HIVE的最佳方法是什么?

0 个答案:

没有答案