You can export a single R Extension as a stored procedure from Expert Analytics to SAP HANA. After which, any SAP HANA user can consume those models for analysis.
To export an R Extension as a stored procedure, take the following steps.
You have exported a single R Extension to SAP HANA. On calling the procedure, the result grid consists of the features that you selected to train your model on, plus all predicted columns.
This functionality exports the single model that you have selected as a stored procedure, as opposed to the entire analysis chain. The exported stored procedure and associated objects (tables, types) appear under the selected schema in the SAP HANA database.
CREATE TABLE InputData like PAS00AMYWGCT0Y_ZE4LISJ2MWSCOREPROCEDURE_INPUT_TYPE; --- Insert the data that you would like to score on into the InputData table: CREATE TABLE ResultTable like PAS00AMYWGCT0Y_ZE4LISJ2MWSCOREPROCEDURE_OUTPUT_TYPE; call "ANALYTICS"."ScoreProcedure"(InputData,ResultTable) WITH OVERVIEW; select * from ResultTable;
PAS00AMYWGCT0Y_ZE4LISJ2MWSCOREPROCEDURE_INPUT_TYPE: The table type that defines the input columns of the exported stored procedure. It contains all feature columns that you used to train your model.
PAS00AMYWGCT0Y_ZE4LISJ2MWSCOREPROCEDURE_OUTPUT_TYPE: The table type that defines the output columns of the exported stored procedure. It contains all feature columns that you used to train your model, plus the columns that your stored procedure generates.