Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

Getting Error While Using PAL lib. In HANA

$
0
0

Hi All,

 

While executing a PAL algorithm i am getting the error stated below.

 

Could not execute 'CALL _SYS_AFL.PAL_ANOMALY_DETECTION_TEST1(PAL_AD_DATA_TAB, PAL_CONTROL_TAB, PAL_AD_RESULT_TAB) with ...' in 295 ms 860 µs .

SAP DBTech JDBC: [2048]: column store error: search table error:  [2620] executor: plan operation failed;CalculationNode ($$P3$$):Internal compiler error at AFLLANG script:failed to open library package '_SYS_AFL'.'AFLPAL', package already loaded

 

 

I am using the below script to generate a PAL procedure.

=================================================================================================

SET SCHEMA I060653;

DROP TYPE PAL_AD_RESULT_T;

CREATE TYPE PAL_AD_RESULT_T AS TABLE(

"ID" INT,

"V000" DOUBLE,

"V001" DOUBLE

);

DROP TYPE PAL_AD_DATA_T;

CREATE TYPE PAL_AD_DATA_T AS TABLE(

"ID" INT,

"V000" DOUBLE,

"V001" DOUBLE,

primary key("ID")

);

DROP TYPE PAL_CONTROL_T;

CREATE TYPE PAL_CONTROL_T AS TABLE(

"NAME" VARCHAR (50),

"INTARGS" INTEGER,

"DOUBLEARGS" DOUBLE,

"STRINGARGS" VARCHAR (100)

);

 

 

-- create procedure

DROP TABLE PDATA1;

CREATE COLUMN TABLE PDATA1(

"ID" INT,

"TYPENAME" VARCHAR(100),

"DIRECTION" VARCHAR(100) );

INSERT INTO PDATA1 VALUES (1, 'I060653.PAL_AD_DATA_T', 'in');

INSERT INTO PDATA1 VALUES (2, 'I060653.PAL_CONTROL_T', 'in');

INSERT INTO PDATA1 VALUES (3, 'I060653.PAL_AD_RESULT_T', 'out');

 

 

GRANT SELECT ON I060653.PDATA1 to SYSTEM;

call SYSTEM.afl_wrapper_generator('PAL_ANOMALY_DETECTION_TEST1', 'AFLPAL',

'ANOMALYDETECTION', PDATA1);

 

DROP TABLE PAL_AD_DATA_TAB;

CREATE COLUMN TABLE PAL_AD_DATA_TAB (

"ID" INT,

"V000" DOUBLE,

"V001" DOUBLE,

primary key("ID")

);

 

INSERT INTO PAL_AD_DATA_TAB VALUES (0 , 0.5, 0.5);

INSERT INTO PAL_AD_DATA_TAB VALUES (1 , 1.5, 0.5);

INSERT INTO PAL_AD_DATA_TAB VALUES (2 , 1.5, 1.5);

   

DROP TABLE PAL_CONTROL_TAB;

CREATE COLUMN TABLE PAL_CONTROL_TAB (

"NAME" VARCHAR (50),

"INTARGS" INTEGER,

"DOUBLEARGS" DOUBLE,

"STRINGARGS" VARCHAR (100)

);

INSERT INTO PAL_CONTROL_TAB VALUES ('THREAD_NUMBER',2,null,null);

INSERT INTO PAL_CONTROL_TAB VALUES ('GROUP_NUMBER',4,null,null);

INSERT INTO PAL_CONTROL_TAB VALUES ('INIT_TYPE',4,null,null);

INSERT INTO PAL_CONTROL_TAB VALUES ('DISTANCE_LEVEL',2,null,null);

INSERT INTO PAL_CONTROL_TAB VALUES ('MAX_ITERATION',100,null,null);

 

   DROP TABLE PAL_AD_RESULT_TAB;

CREATE COLUMN TABLE PAL_AD_RESULT_TAB (

"ID" INT,

"V000" DOUBLE,

"V001" DOUBLE

);

 

     CALL _SYS_AFL.PAL_ANOMALY_DETECTION_TEST1(PAL_AD_DATA_TAB, PAL_CONTROL_TAB,

PAL_AD_RESULT_TAB) with overview;

select * from PAL_AD_RESULT_TAB;


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>