Hi Community,
I am implementing a feature, which needs connection to R. I have the following code, in which I try to give data to R and run a script.
dl::DataTables += {'TimeSeries'};
empty DataMap;
DataMap(dl::dt, dl::idn, dl::cn, dl::dn) += data {
(TimeSeries, 'lg::S_ActivePeriods', 1, 1) : "period",
(TimeSeries, 'lg::P_TimeSeries', 2, 0) : "demand"
};
MapName := "TimeSeriesMap";
dl::RemoveDataSourceMapping(MapName);
dl::AddDataSourceMapping( MapName, DataMap,
dl::DependEmpty, dl::TableAttributesEmpty, dl::ColAttributeEmpty );
dl::ExecScript("source('script.r')",MapName,XA);
When dl::AddDataSourceMapping runs, I get the following error message: “Unable to obtain identifier handle for column [period, lg::S_ActivePeriods] in table [TimeSeriesMap, TimeSeries]. I have checked that DataMap contains the right data.
Any advice is much appreciated. This is my first question in the community, please, don’t be harsh on me. If any further information is needed, I will gladly give it :)
Thanks,
Zsolti
Best answer by Zsolt Mihály
View original