It appears that I can successfully connect to Teradata via R, but when I try to perform some function on my td.data.frame, it provides the following error after the last line of my code:
"42S02 -3807 [NCR][ODBC Teradata Driver][Teradata Database] Object 'my_sample_table' does not exist. "
tdf <- td.data.frame("my_sample_table","my_db")
my.stats <- td.stats(tdf,"Numerical_Column_of_Interest", c("cnt","min","max","mean"))
Note: I changed the database and table names, but the concept is the same. I am fairly confident that my td.data.frame() line works because when I put in a bogus table name, it errors out. When I put in a good table name, it takes about 2 mins to finish running. I also get the same error message when I try different functions, not just td.stat().
Any ideas on how to make this work? I have spent about and hour searching google and have found very little documentation or samples on the teradataR package.
You migh need to set the default DB on the connect statement.
the following worked for me:
Lade nötiges Paket: DBI
Lade nötiges Paket: rJava
> tdf <- td.data.frame("calendar")
> my.stats <- td.stats(tdf,"year_of_calendar", c("cnt","min","max","mean"))
col xcnt xmin xmax xmean
1 year_of_calendar 73414 1900 2100 2000
I am trying to connect via JDBC using Ulrich's approach but I am not having success. Everything appears to work fine until I try to create the data frame:
does the table exists in the DB you specified in the tdConnect?
I am not aware that JDBC would not work on Red Hat - it works on Suse
Yes, the table does exist. I have re-confirmed. Glad to hear that it works on Linux.
Here is my code:
Can you run my sys_calendar example - as calendar should be available on every system.
On a mac I had once the problem that I had to rerun library .jaddClassPath... sections twice...
I am still not able to connect via JDBC but that is ok. We were able to get ODBC support installed on our Linux environment and that is working for me.
Thanks for your assistance.
Just to avoid future problems
tdConnect("10.33.2.136","my_uid","my_pwd","EDEE_POC"," jdbc ")
is not getting a connection due to the blanks in " jdbc "
it has to be "jdbc"
unfortunatly no error messag is raised...