How to read data from Cassandra with R?

后端 未结 5 884

I am using R 2.14.1 and Cassandra 1.2.11, I have a separate program which has written data to a single Cassandra table. I am failing to read them from R.

The Cassa

5条回答
  •  抹茶落季
    2020-12-09 10:54

    You have to download apache-cassandra-2.0.10-bin.tar.gz and cassandra-jdbc-1.2.5.jar and cassandra-all-1.1.0.jar.

    There is no need to install Cassandra on your local machine; just put the cassandra-jdbc-1.2.5.jar and the cassandra-all-1.1.0.jar files in the lib directory of unziped apache-cassandra-2.0.10-bin.tar.gz. Then you can use

     library(RJDBC)
     drv <- JDBC("org.apache.cassandra.cql.jdbc.CassandraDriver", 
                  list.files("D:/apache-cassandra-2.0.10/lib",
                  pattern="jar$",full.names=T))
    

    That is working on my unix but not on my windows machine. Hope that helps.

提交回复
热议问题