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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

DROP TYPE <strong>PAL</strong>_DISTRFITCENSORED_STATISTICS_T;<br />

CREATE TYPE <strong>PAL</strong>_DISTRFITCENSORED_STATISTICS_T AS TABLE(<br />

"NAME" VARCHAR(50),<br />

"VALUE" DOUBLE<br />

);<br />

DROP TABLE PDATA_TBL;<br />

CREATE COLUMN TABLE PDATA_TBL(<br />

"POSITION" INT,<br />

"SCHEMA_NAME" NVARCHAR(256),<br />

"TYPE_NAME" NVARCHAR(256),<br />

"PARAMETER_TYPE" VARCHAR(7)<br />

);<br />

INSERT INTO PDATA_TBL VALUES (1, 'DM_<strong>PAL</strong>','<strong>PAL</strong>_DISTRFITCENSORED_DATA_T', 'IN');<br />

INSERT INTO PDATA_TBL VALUES (2, 'DM_<strong>PAL</strong>','<strong>PAL</strong>_CONTROL_T', 'IN');<br />

INSERT INTO PDATA_TBL VALUES (3, 'DM_<strong>PAL</strong>','<strong>PAL</strong>_DISTRFITCENSORED_ESTIMATION_T',<br />

'OUT');<br />

INSERT INTO PDATA_TBL VALUES (4, 'DM_<strong>PAL</strong>','<strong>PAL</strong>_DISTRFITCENSORED_STATISTICS_T',<br />

'OUT');<br />

CALL SYS.AFLLANG_WRAPPER_PROCEDURE_DROP('DM_<strong>PAL</strong>','<strong>PAL</strong>_DISTRFITCENSORED_PROC');<br />

CALL SYS.AFLLANG_WRAPPER_PROCEDURE_CREATE('AFL<strong>PAL</strong>',<br />

'DISTRFITCENSORED','DM_<strong>PAL</strong>','<strong>PAL</strong>_DISTRFITCENSORED_PROC',PDATA_TBL);<br />

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

CREATE COLUMN TABLE <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL LIKE<br />

<strong>PAL</strong>_DISTRFITCENSORED_DATA_T;<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (3,NULL);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (6,6);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (6,6);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (6,6);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (6,6);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (8,8);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (8,8);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (12,12);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (12,12);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (12,NULL);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (15,NULL);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (16,NULL);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (18,NULL);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (18,NULL);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (20,20);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (22,NULL);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (24,24);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (28,NULL);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (28,NULL);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (28,NULL);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (30,30);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (30,NULL);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (33,NULL);<br />

INSERT INTO <strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL VALUES (42,42);<br />

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

CREATE COLUMN TABLE <strong>PAL</strong>_CONTROL_TBL(<br />

"NAME" VARCHAR (50),<br />

"INTARGS" INTEGER,<br />

"DOUBLEARGS" DOUBLE,<br />

"STRINGARGS" VARCHAR (100)<br />

);<br />

INSERT INTO <strong>PAL</strong>_CONTROL_TBL VALUES ('DISTRIBUTIONNAME', NULL, NULL,'WEIBULL');<br />

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

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

CREATE COLUMN TABLE <strong>PAL</strong>_DISTRFITCENSORED_ESTIMATION_TBL LIKE<br />

<strong>PAL</strong>_DISTRFITCENSORED_ESTIMATION_T;<br />

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

CREATE COLUMN TABLE <strong>PAL</strong>_DISTRFITCENSORED_STATISTICS_TBL LIKE<br />

<strong>PAL</strong>_DISTRFITCENSORED_STATISTICS_T;<br />

CALL DM_<strong>PAL</strong>.<strong>PAL</strong>_DISTRFITCENSORED_PROC(<strong>PAL</strong>_DISTRFITCENSORED_DATA_TBL,<br />

<strong>PAL</strong>_CONTROL_TBL, <strong>PAL</strong>_DISTRFITCENSORED_ESTIMATION_TBL,<br />

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

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

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

572 P U B L I C<br />

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

End-to-End Scenarios

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

Saved successfully!

Ooh no, something went wrong!