rjdbc

R and cassandra connection error

血红的双手。 提交于 2019-12-04 18:18:46
library(RJDBC) cassdrv <- JDBC("org.apache.cassandra.cql.jdbc.CassandraDriver", list.files("/home/beyhan/Downloads/jars/",pattern="jar$",full.names=T)) casscon <- dbConnect(cassdrv, "jdbc:cassandra://localhost:9042") Output > cassdrv <- JDBC("org.apache.cassandra.cql.jdbc.CassandraDriver", + list.files("/home/beyhan/Downloads/jars/",pattern="jar$",full.names=T)) > casscon <- dbConnect(cassdrv, "jdbc:cassandra://localhost:9042") Error in .jcall(drv@jdrv, "Ljava/sql/Connection;", "connect", as.character(url)[1], : java.lang.NoClassDefFoundError: org/apache/thrift/transport/TTransportException

Unable to connect cassandra through R

不羁岁月 提交于 2019-12-03 19:04:38
I am trying to follow an example given on " http://www.datastax.com/dev/blog/big-analytics-with-r-cassandra-and-hive " to connect R with Cassandra. Following is my code: library(RJDBC) #Load in the Cassandra-JDBC diver cassdrv <- JDBC("org.apache.cassandra.cql.jdbc.CassandraDriver", list.files("D:/cassandra/lib",pattern="jar$",full.names=T)) #Connect to Cassandra node and Keyspace casscon <- dbConnect(cassdrv, "jdbc:cassandra://127.0.0.1:9042/demodb") When I run above code in R, I get following error: Error in .jcall(drv@jdrv, "Ljava/sql/Connection;", "connect", as.character(url)[1], : java

How to prevent truncation of error messages in R

微笑、不失礼 提交于 2019-12-01 00:12:23
问题 I am querying a database in R using RJDBC. The queries are built up from data which is read in from a file. These queries can get very long, and can potentially include non existent columns (resulting in an error). Below is a simplified example, it takes the file as input and the runs 2 queries generated from the file. table column drinks cost drinks sugar drinks volume food cost SELECT column, cost, sugar FROM drinks; SELECT cost FROM food; Because these queries can get very long, any errors

Connect R and Teradata using JDBC

空扰寡人 提交于 2019-11-30 23:03:11
I´m trying to connect R and Teradata using RJDBC. I´ve found this link that has an example using mysql, but i´m nos sure how to do the same with teradata. library(RJDBC) drv <- JDBC("com.mysql.jdbc.Driver", "/etc/jdbc/mysql-connector-java-3.1.14-bin.jar", identifier.quote="`") conn <- dbConnect(drv, "jdbc:mysql://localhost/test", "user", "pwd") I´ve downloaded this driver: http://downloads.teradata.com/download/connectivity/jdbc-driver But i´m not sure where i should reference the directory. I know there is a teradataR package out there , but i don´t know if it really works with the R 3.0.0.

Connect R and Teradata using JDBC

痴心易碎 提交于 2019-11-30 18:29:46
问题 I´m trying to connect R and Teradata using RJDBC. I´ve found this link that has an example using mysql, but i´m nos sure how to do the same with teradata. library(RJDBC) drv <- JDBC("com.mysql.jdbc.Driver", "/etc/jdbc/mysql-connector-java-3.1.14-bin.jar", identifier.quote="`") conn <- dbConnect(drv, "jdbc:mysql://localhost/test", "user", "pwd") I´ve downloaded this driver: http://downloads.teradata.com/download/connectivity/jdbc-driver But i´m not sure where i should reference the directory.

Connecting to MS SQL Server from R on Mac/Linux

笑着哭i 提交于 2019-11-30 08:46:38
I'm trying to connect to an Microsoft SQL Server from R on Mac/Linux, and I have problems with RJDBC. When I've downloaded both Microsoft's driver and JTDS, but none of the following lines work: library(RJDBC) drv <- JDBC("com.microsoft.sqlserver.jdbc.SQLServerDriver", "/Users/victor/Downloads/sqljdbc_3.0/enu/sqljdbc4.jar") drv1 <- JDBC('net.sourceforge.jtds.jdbc.Driver', "/Users/victor/Downloads/jtds-1/jtds-1.3.0.jar") Each one return the following error message: Error in .jfindClass(as.character(driverClass)[1]) : class not found I suspect the issue may be with the wrong Java version: my