n = c(2, 3, 5)
s = c("aa", "bb", "cc")
b = c(TRUE, FALSE, TRUE)
df = data.frame(n, s, b)
ch <- odbcConnect("Drill")
sqlSave(ch, df, tablename = "tblTest", rownames=FALSE, append=TRUE)
当我执行上面的代码时,它抛出异常:
Error in sqlSave(ch, df, tablename = "tblTest", rownames = FALSE, append = FALSE) :
HY000 1040 [MapR][Drill] (1040) Drill failed to execute the query: CREATE TABLE "tblTest" ("n" DOUBLE, "s" varchar(255), "b" varchar(255))
[30024]Query execution error. Details:[
ParseException: Encountered "\"" at line 1, column 14.
Was expecting one of:
<IDENTIFIER> ...
<QUOTED_IDENTIFIER> ...
<BACK_QUOTED_IDENTIFIER> ...
<BRACKET_QUOTED_IDENTIFIER> ...
<UNICODE_QUOTED_IDENTIFIER> ...
]
我在互联网上研究了很长时间,但仍然无法找到解决方案。有人可以帮忙吗?谢谢。