ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 第二章 Teradata IN-DATABASE analysis with R

第二章 Teradata IN-DATABASE analysis with R

原创 Linux操作系统 作者:gjw_dw_bi 时间:2012-05-14 17:26:27 0 删除 编辑
今天浅尝了下teradataR package,所谓的R在Teradata的in-db analysis。
> library(RJDBC)

> jdbc.drv<-JDBC("com.teradata.jdbc.TeraDriver", c("C:/JDBC/terajdbc4.jar", "C:/JDBC/tdgssconfig.jar"))


> library(teradataR)

> tdConnect("caracal.vip.ebay.com","myID","myPWD", database="myDB", dType="jdbc")

> tdf <- td.data.frame("dw_cal_dt", "access_views")

> summary(tdf)
Error in .verify.JDBC.result(s, "Unable to execute JDBC statement ", statement) : 
  Unable to execute JDBC statement SELECT MAX(CASE WHEN qtile <= 2739 THEN cval ELSE NULL END) AS quar1,MAX(CASE WHEN qtile <= 8218 THEN cval ELSE NULL END) AS quar3,MAX(CASE WHEN qtile <= 5479 THEN cval ELSE NULL END) AS med1 FROM (SELECT DISTINCT "AGE_FOR_DT_ID" as cval, RANK() OVER (ORDER BY "AGE_FOR_DT_ID" )  AS qtile FROM "access_views"."dw_cal_dt" WHERE cval IS NOT NULL ) A ([Teradata Database] [TeraJDBC 13.10.00.18] [Error 3130] [SQLState HY000] Response limit exceeded.)

本人所在单位的TD系统设置有运行threshold,一旦发现query太耗资源,则不允许执行。从这个错误,我们可以推测出,Teradata的In-DB analysis的R函数其实是用SQL来实现的,并非用Teradata底层的CLI接口编写的(如用C语言)。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26935210/viewspace-723553/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2012-05-01

  • 博文量
    8
  • 访问量
    29698