I've created a model in R, published into SQL Server table and validated the model by calling it into SQL Server. However, I am failing to execute model stored procedure in SQL server.
I get this error message:
Msg 39004, Level 16, State 20, Line 2
A 'R' script error occurred during execution of 'sp_execute_external_script' with HRESULT 0x80004004.
Msg 39019, Level 16, State 2, Line 2
An external script error occurred:
Error in unserialize(rx_model) : read error
Calls: source -> withVisible -> eval -> eval -> unserialize
Error in execution. Check the output for more information.
Error in eval(expr, envir, enclos) :
Error in execution. Check the output for more information.
Calls: source -> withVisible -> eval -> eval -> .Call
Execution halted
Tried this;
model <- unserialize(rx_model);
or
model <- unserialize(as.raw(rx_model));
also tried;
model = unserialize(rx_model);
Still getting same error.
New to R/ML in SQL Server, help would be appreciated