aliyun / aliyun-odps-r-plugin

R plugin for MaxCompute/ODPS
http://odps.aliyun.com
Other
24 stars 6 forks source link

数据下载本地问题 #12

Closed BruceZhaoR closed 1 year ago

BruceZhaoR commented 5 years ago

用ropds.read.table表的时候,提示权限问题,但是用pyodps就可以。

是否考虑采用R的reticulate包,用Python的SDK,重新写一个R包? Python的SDK感觉功能更丰富,而且活跃度较高。

lyman commented 5 years ago

这个没有道理啊,rodps.read.table 就是个 tunnel 下载行为,两边的实现没有什么本质区别,报什么权限问题?

ps. rodps 的原始开发同学离职了之后,团队里缺少对 R 足够熟的同学做大改动/重构。rodps 欢迎志愿者提供代码 PR。

BruceZhaoR commented 5 years ago

@lyman https://pyodps.readthedocs.io/zh_CN/latest/base-sql.html#id4 应该是Python的这个功能,不是走tunnel的。

R里面好像没有这个函数。我看到骎行开发了ropds2,是基于Python hack的,但是2年没有更新了,现在 reticulate 提供了很好的R与Python的数据交互,https://rstudio.github.io/reticulate/。 如果能结合R的 dbplyr https://dbplyr.tidyverse.org/ 的统一语法,能够让使用R的分析师快速上手。

rodps 的另外一个优势是可以直接写R的模型,这个功能非常棒。跟PAI相比,不知您觉得哪个更好呢?

> library(rpart)
> fit <- rpart(Species~., data=iris)
> rodps.predict.rpart(fit, srctbl='iris',tgttbl='iris_p') # modeling
caesar0301 commented 1 year ago

ropds.read.table原理是调用RJava调用Java sdk的tunnel download封装,如果报权限错误,可以从外围检查下是否有read权限,例如通过odpscmd验证。