我正在使用的 Vertica 数据库表有一个名为:event.date
我可以正常连接:
install.packages("RJDBC",dep=TRUE)
library(RJDBC)
vDriver <- JDBC(driverClass="com.vertica.jdbc.Driver", classPath="C:/Vertica/vertica jar/vertica-jdbc-7.0.1-0.jar")
vertica <- dbConnect(vDriver, "jdbc:vertica://127.0.0.1:5433/dir", "name", "pass")
我可以从中提取常规查询:
myframe = dbGetQuery(vertica, "Select * from output_servers")
但如果我想要名称中带有点的特定列,则会出现错误。
myframe = dbGetQuery(vertica, "Select product, incident, incident.date from output_servers")
Error in .verify.JDBC.result(r, "Unable to retrieve JDBC result set for ", :
Unable to retrieve JDBC result set for Select product, incident, incident.date from output_servers ([Vertica][VJDBC](4566) ERROR: Relation "incident" does not exist)
我试过方括号、反引号、单引号和双引号,以及列名周围的反斜杠。我很确定这很简单,但我错过了什么?谢谢!