[英]Having trouble specifying a schema name from MonetDB.R
I am trying to connect to a table that is not in the sys schema. 我试图连接到不在sys模式中的表。 The code below works if sys.tablea exists.
如果sys.tablea存在,则下面的代码有效。
conn <- dbConnect(dbDriver("MonetDB"), "monetdb://localhost/demo")
frame <- monet.frame(conn,"tablea")
If I define tablea in a different schema, eg xyz.tablea, then I get the error message 如果我在其他模式(例如xyz.tablea)中定义tablea,则会收到错误消息
Server says 'SELECT: no such table 'tablea'' [#NA]
The account used to connect has rights to the table. 用于连接的帐户有权访问该表。
In a related question, is it possible to use camel-case from MonetDB.R? 在一个相关的问题中,是否可以使用MonetDB.R中的驼峰式保护套? When I change the table name to TableA, the server again responds with
当我将表名称更改为TableA时,服务器再次响应
Server says 'SELECT: no such table 'tablea'' [#NA]
where the table name is all lower-case. 表名全为小写。
Using tables in other schemata is not possible with the current constructor of monet.frame. 对于monet.frame的当前构造函数,无法在其他架构中使用表。 However, you can work around the issue as follows:
但是,您可以解决此问题,如下所示:
frame <- monet.frame(conn,"select * from xyz.tablea") 框架<-monet.frame(conn,“从xyz.tablea中选择*”)
This trick also works with CamelCased table names. 此技巧也适用于CamelCased表名。 For the next version, I am planning to fix the issue.
对于下一个版本,我正计划解决此问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.