从表中获取数据

时间:2017-11-01 06:56:13

标签: r cassandra nosql

我尝试从R连接到Cassandra DB以从表中获取数据。

我也提到了https://cran.r-project.org/web/packages/RCassandra/RCassandra.pdf

备用选项是在R中使用rJava库并在R中加载Cassandra驱动程序以连接到Cassandra DB。但是驱动程序在接收的数据帧大小方面存在限制。因此想要使用RCassandra。

    library(RCassandra)
    conn <- RC.connect(host="xx.xx.xx.xx", port=9160)
    conn <- RC.login(conn, username = "abc", password = "def")
    a<-RC.cluster.name(conn)
    b<-RC.use(conn, "keyspacename")
    RC.read.table(conn, "tablename")
    RC.get.range.slices(conn, "table1", limit=10)

第6行输出错误

  
    

错误(函数(...,row.names = NULL,check.rows = FALSE,     check.names = TRUE,:重复row.names:

  

**最后一行(第7行)的输出

  

**关键值ts 1 1.507174e + 15 2 1.507174e + 15 3 1.507174e + 15 4 1.507174e + 15 5 1.507174e + 15 6 1.507174e + 15 7 1.507174e + 15 8 1.507174e + 15 9 1.507174 e + 15 10 1.507174e + 15

     

[[84]]键值ts 1
  1.507711e + 15 2 \ fp 1.507711e + 15 3 1.507711e + 15 4 \ fr 1.507711e + 15

0 个答案:

没有答案
相关问题