25.10.2016 Views

SAP HANA Predictive Analysis Library (PAL)

sap_hana_predictive_analysis_library_pal_en

sap_hana_predictive_analysis_library_pal_en

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The result will tell you whether the <strong>PAL</strong> functions were successfully installed on your system.<br />

2.5 Calling <strong>PAL</strong> Functions<br />

To use <strong>PAL</strong> functions, you must do the following:<br />

●<br />

●<br />

From within SQLScript code, generate a procedure that wraps the <strong>PAL</strong> function.<br />

Call the procedure, for example, from an SQLScript procedure.<br />

Step 1 – Generate a <strong>PAL</strong> Procedure<br />

Any user granted with the AFLPM_CREATOR_ERASER_EXECUTE role can generate an AFLLANG procedure for a<br />

specific <strong>PAL</strong> function. The syntax is shown below:<br />

CALL SYS.AFLLANG_WRAPPER_PROCEDURE_CREATE (‘’, ‘’,<br />

‘’, '', );<br />

●<br />

●<br />

●<br />

●<br />

●<br />

: Always set to AFL<strong>PAL</strong>.<br />

: A <strong>PAL</strong> built-in function name.<br />

: A name of the schema that you want to create.<br />

: A name for the <strong>PAL</strong> procedure. This can be anything you want.<br />

: A user-defined table variable. The table contains records to describe the position,<br />

schema name, table type name, and parameter type, as defined below:<br />

(<br />

POSITION int,<br />

SCHEMA_NAME nvarchar(256),<br />

TYPE_NAME nvarchar(256),<br />

PARAMETER_TYPE varchar(7)<br />

)<br />

A typical table variable references a table with the following definition:<br />

Table 1:<br />

Position Schema Name Table Type Name Parameter Type<br />

1 IN<br />

2 <br />

IN<br />

3 OUT<br />

Note<br />

1. The SYS.AFLLANG_WRAPPER_PROCEDURE_CREATE is in invoker mode, which means, the invoker must<br />

be allowed to read the table.<br />

<strong>SAP</strong> <strong>HANA</strong> <strong>Predictive</strong> <strong>Analysis</strong> <strong>Library</strong> (<strong>PAL</strong>)<br />

Getting Started with <strong>PAL</strong> P U B L I C 9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!