Is there a way to use R scripts in an ODM workflow without defining the output?
So that ODM identifies the number and types of columns from the output.
Currently I use R scripts as follows:
If there are n1 character columns and n2 numeric columns in the output from the script then I use something like:
select * from table(rqTableEval
( CURSOR (
SELECT
*
FROM
TABLE1
)
, -- Input Cursor
cursor(select * from dual)
, -- Param Cursor
'select
cast(null as varchar2(100)) char_col1,
cast(null as varchar2(100)) char_col2,
... ,
cast(null as varchar2(100)) char_coln1,
0 as num_col1,
0 as num_col2,
... ,
0 as num_coln2
from dual', -- Output Definition
'rscript' -- R Script
))