我正在尝试运行流处理器中示例中存在的RScriptSample。
我已按照here给出的步骤进行操作。
我已经安装了R和rJava,并相应地设置了R_HOME和JRI_HOME。
exports.handler = function (somerArgsHere) {
const connection = mysql.createConnection({
host: process.env.HOST,
user: process.env.USER,
password: process.env.PASSWORD,
});
代码无法编译。我在最后一行收到此错误。
@App:name("RScriptSample")
@App:description('Use a R script to process events and produce aggregated outputs based on the provided input variable parameters and expected output attributes.')
define stream weather (time long, temp double);
@sink(type='log')
define stream dataOut (time long, temp double, c long, m double );
@info(name = 'query')
from weather#window.lengthBatch(2)#r:eval("c <- sum(time); m <- sum(temp)", "c long, m double", time, temp)
select * insert into dataOut;
我在做什么错了?