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.

INSERT INTO <strong>PAL</strong>_SAMPLING_DATA_TBL VALUES (1, 'male', 4000.5);<br />

INSERT INTO <strong>PAL</strong>_SAMPLING_DATA_TBL VALUES (2, 'male', 5000.7);<br />

INSERT INTO <strong>PAL</strong>_SAMPLING_DATA_TBL VALUES (3, 'female', 5100.8);<br />

INSERT INTO <strong>PAL</strong>_SAMPLING_DATA_TBL VALUES (4, 'male', 5400.9);<br />

INSERT INTO <strong>PAL</strong>_SAMPLING_DATA_TBL VALUES (5, 'female', 5500.2);<br />

INSERT INTO <strong>PAL</strong>_SAMPLING_DATA_TBL VALUES (6, 'male', 5540.4);<br />

INSERT INTO <strong>PAL</strong>_SAMPLING_DATA_TBL VALUES (7, 'male', 4500.9);<br />

INSERT INTO <strong>PAL</strong>_SAMPLING_DATA_TBL VALUES (8, 'female', 6000.8);<br />

INSERT INTO <strong>PAL</strong>_SAMPLING_DATA_TBL VALUES (9, 'male', 7120.8);<br />

INSERT INTO <strong>PAL</strong>_SAMPLING_DATA_TBL VALUES (10, 'female', 8120.9);<br />

INSERT INTO <strong>PAL</strong>_SAMPLING_DATA_TBL VALUES (11, 'female', 7453.9);<br />

INSERT INTO <strong>PAL</strong>_SAMPLING_DATA_TBL VALUES (12, 'male', 7643.8);<br />

INSERT INTO <strong>PAL</strong>_SAMPLING_DATA_TBL VALUES (13, 'male', 6754.3);<br />

INSERT INTO <strong>PAL</strong>_SAMPLING_DATA_TBL VALUES (14, 'male', 6759.9);<br />

INSERT INTO <strong>PAL</strong>_SAMPLING_DATA_TBL VALUES (15, 'male', 9876.5);<br />

INSERT INTO <strong>PAL</strong>_SAMPLING_DATA_TBL VALUES (16, 'female', 9873.2);<br />

INSERT INTO <strong>PAL</strong>_SAMPLING_DATA_TBL VALUES (17, 'male', 9889.9);<br />

INSERT INTO <strong>PAL</strong>_SAMPLING_DATA_TBL VALUES (18, 'male', 9910.4);<br />

INSERT INTO <strong>PAL</strong>_SAMPLING_DATA_TBL VALUES (19, 'male', 7809.3);<br />

INSERT INTO <strong>PAL</strong>_SAMPLING_DATA_TBL VALUES (20, 'female', 8705.7);<br />

INSERT INTO <strong>PAL</strong>_SAMPLING_DATA_TBL VALUES (21, 'male', 8756.0);<br />

INSERT INTO <strong>PAL</strong>_SAMPLING_DATA_TBL VALUES (22, 'female', 7843.2);<br />

INSERT INTO <strong>PAL</strong>_SAMPLING_DATA_TBL VALUES (23, 'male', 8576.9);<br />

INSERT INTO <strong>PAL</strong>_SAMPLING_DATA_TBL VALUES (24, 'male', 9560.9);<br />

INSERT INTO <strong>PAL</strong>_SAMPLING_DATA_TBL VALUES (25, 'female', 8794.9);<br />

DROP TABLE #<strong>PAL</strong>_CONTROL_TBL;<br />

CREATE LOCAL TEMPORARY COLUMN TABLE #<strong>PAL</strong>_CONTROL_TBL<br />

(<br />

"NAME"<br />

VARCHAR(50),<br />

"INTARGS" INTEGER,<br />

"DOUBLEARGS" DOUBLE,<br />

"STRINGARGS" VARCHAR(100)<br />

);<br />

INSERT INTO #<strong>PAL</strong>_CONTROL_TBL VALUES ('SAMPLING_METHOD', 0, NULL, NULL);<br />

INSERT INTO #<strong>PAL</strong>_CONTROL_TBL VALUES ('SAMPLING_SIZE', 8, NULL, NULL);<br />

INSERT INTO #<strong>PAL</strong>_CONTROL_TBL VALUES ('INTERVAL', 5, NULL, NULL);<br />

INSERT INTO #<strong>PAL</strong>_CONTROL_TBL VALUES ('COLUMN_CHOOSE', 2, NULL, NULL);<br />

DROP TABLE <strong>PAL</strong>_SAMPLING_RESULT_TBL;<br />

CREATE COLUMN TABLE <strong>PAL</strong>_SAMPLING_RESULT_TBL LIKE <strong>PAL</strong>_SAMPLING_RESULT_T;<br />

CALL DM_<strong>PAL</strong>.SAMPLING_TEST_PROC(<strong>PAL</strong>_SAMPLING_DATA_TBL, "#<strong>PAL</strong>_CONTROL_TBL",<br />

<strong>PAL</strong>_SAMPLING_RESULT_TBL) WITH OVERVIEW;<br />

SELECT * FROM <strong>PAL</strong>_SAMPLING_RESULT_TBL;<br />

Expected Result<br />

If method is 0 and SAMPLING_SIZE is 8:<br />

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

<strong>PAL</strong> Functions P U B L I C 473

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

Saved successfully!

Ooh no, something went wrong!