Skip to Content
0

sap hana cyclical dependency error [129]

Nov 10, 2016 at 02:30 PM

20

avatar image

Hi experts,

I am encountering error [129] when I am calling a PAL function within a stored procedure. The code is

SET SCHEMA DM_PAL;

DROP TYPE PAL_UNIVARSTAT_DATA_T;

CREATE TYPE PAL_UNIVARSTAT_DATA_T AS TABLE("total" DOUBLE NOT NULL, "NrofOrder" DOUBLE NOT NULL, "movAvg" DOUBLE NOT NULL, "avgMonLas" DOUBLE NOT NULL);

DROP TABLE PAL_UNIVARSTAT_DATA_TBL;

CREATE COLUMN TABLE PAL_UNIVARSTAT_DATA_TBL AS (SELECT "total", "NrofOrder", "movAvg", "avgMonLas" FROM DM_PAL.TRAIN );

DROP TYPE PAL_UNIVARSTAT_RESULT_T;

DROP TYPE PAL_CONTROL_T;

DROP TABLE PAL_UNIVARSTAT_PDATA_TBL;

DROP TABLE PAL_CONTROL_TBL;

DROP TABLE PAL_UNIVARSTAT_RESULT_TBL;

CREATE TYPE PAL_CONTROL_T AS TABLE( "NAME" VARCHAR (50), "INTARGS" INTEGER, "DOUBLEARGS" DOUBLE, "STRINGARGS" VARCHAR (100) );

CREATE TYPE PAL_UNIVARSTAT_RESULT_T AS TABLE( "STATISTICSNAME" VARCHAR(100), "total" DOUBLE, "NrofOrder" DOUBLE, "movAvg" DOUBLE, "avgMonLas" DOUBLE );

DROP PROCEDURE SKEWNESS_PROC;

CREATE PROCEDURE SKEWNESS_PROC (IN INTAB PAL_UNIVARSTAT_DATA_T) LANGUAGE SQLSCRIPT

AS

BEGIN

DECLARE dynamic_sql varchar(300);

BEGIN

CREATE COLUMN TABLE PAL_UNIVARSTAT_PDATA_TBL("POSITION" INT, "SCHEMA_NAME" NVARCHAR(256), "TYPE_NAME" NVARCHAR(256), "PARAMETER_TYPE" VARCHAR(7)); INSERT INTO PAL_UNIVARSTAT_PDATA_TBL VALUES (1,'DM_PAL', 'PAL_UNIVARSTAT_DATA_T','IN');

INSERT INTO PAL_UNIVARSTAT_PDATA_TBL VALUES (2,'DM_PAL', 'PAL_CONTROL_T','IN'); INSERT INTO PAL_UNIVARSTAT_PDATA_TBL VALUES (3,'DM_PAL', 'PAL_UNIVARSTAT_RESULT_T','OUT'); PDATA_TEMP = SELECT * FROM PAL_UNIVARSTAT_PDATA_TBL;

END;

CALL SYS.AFLLANG_WRAPPER_PROCEDURE_DROP('DM_PAL', 'PAL_UNIVARIATESTAT_PROC');

CALL SYS.AFLLANG_WRAPPER_PROCEDURE_CREATE('AFLPAL', 'UNIVARSTAT', 'DM_PAL', 'PAL_UNIVARIATESTAT_PROC', :PDATA_TEMP);

BEGIN

CREATE COLUMN TABLE PAL_CONTROL_TBL( "NAME" VARCHAR (50), "INTARGS" INTEGER, "DOUBLEARGS" DOUBLE, "STRINGARGS" VARCHAR (100) );

INSERT INTO PAL_CONTROL_TBL VALUES ('SKEWNESS_TYPE',2,null,null);

INSERT INTO PAL_CONTROL_TBL VALUES ('KURTOSIS_TYPE',2,null,null);

INSERT INTO PAL_CONTROL_TBL VALUES ('DATASET_TYPE',0,null,null);

END;

DATA_TEMP = SELECT * FROM DM_PAL.TRAIN; CONTROL_TEMP = SELECT * FROM PAL_CONTROL_TBL;

CREATE COLUMN TABLE PAL_UNIVARSTAT_RESULT_TBL LIKE PAL_UNIVARSTAT_RESULT_T;

RESULT_TEMP = SELECT * FROM PAL_UNIVARSTAT_RESULT_TBL;

CALL PAL_UNIVARIATESTAT_PROC(:DATA_TEMP, :CONTROL_TEMP, :RESULT_TEMP); END; CALL SKEWNESS_PROC(TEST_TABLE);

error happens on CALL PAL_UNIVARIATESTAT_PROC(:DATA_TEMP, :CONTROL_TEMP, :RESULT_TEMP);

The first two procedure call do not cause any dependency error.

Can anyone help me identify where the dependency is?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers