cancel
Showing results for 
Search instead for 
Did you mean: 

Using the WrapperGenerator with CLOB Type

david_mller
Discoverer
0 Kudos

Hi all,

I'm working with the PAL-Library an SAP HANA. I want to do predicitons with decisiontrees (c4.5 or CHAID).

I face problems using the CLOB-Type for storing the decisiontree.

If I use the wrappergenerator, I can only use VARCHAR as the Datatype to store the decisiontree. If I try to use CLOB an error occurs (see code below).

If I don't use the wrappergenerator and instead I'm working directly with L-Language, it's possible to use the CLOB Datatype without any problems

Thanks for your help.

David

code

CREATE TYPE PAL_DT_IRIS_DATA AS TABLE (SEPAL_LENGTH DOUBLE, SEPAL_WIDTH DOUBLE, PETAL_LENGTH DOUBLE, PETAL_WIDTH DOUBLE, CLASS VARCHAR(20));

CREATE TYPE PAL_DT_IRIS_PARAM AS TABLE (NAME VARCHAR(60), INTARGS INTEGER, DOUBLEARGS DOUBLE, STRINGARGS VARCHAR(100));

CREATE TYPE PAL_DT_IRIS_MODEL_JSON AS TABLE (ID INTEGER, JSONMODEL CLOB);

CREATE TYPE PAL_DT_IRIS_MODEL_PMML AS TABLE (ID INTEGER, PMMLMODEL CLOB);

CREATE COLUMN TABLE PAL_DT_IRIS_SIGNATURE (ID INTEGER, TYPENAME VARCHAR(100), DIRECTION VARCHAR(100));

INSERT INTO PAL_DT_IRIS_SIGNATURE VALUES (1, 'PAL_DT_IRIS_DATA', 'in');

INSERT INTO PAL_DT_IRIS_SIGNATURE VALUES (2, 'PAL_DT_IRIS_PARAM', 'in');

INSERT INTO PAL_DT_IRIS_SIGNATURE VALUES (3, 'PAL_DT_IRIS_MODEL_JSON', 'out');

INSERT INTO PAL_DT_IRIS_SIGNATURE VALUES (4, 'PAL_DT_IRIS_MODEL_PMML', 'out');

  CALL SYSTEM.AFL_WRAPPER_GENERATOR ('PAL_DT_IRIS','AFLPAL','CREATEDT',PAL_DT_IRIS_SIGNATURE);

error

Could not execute 'CALL SYSTEM.AFL_WRAPPER_GENERATOR ('PAL_DT_IRIS3','AFLPAL','CREATEDT',PAL_DT_IRIS_SIGNATURE3)' in 63 ms 52 µs . SAP DBTech JDBC: [423]: liveCache error:  [423] SYSTEM.AFL_WRAPPER_GENERATOR: line 34 col 1 (at pos 1472): liveCache error exception: liveCache error: registration finished with errors, see indexserver trace


Accepted Solutions (0)

Answers (1)

Answers (1)

rindia
Active Contributor
0 Kudos

Dear David,

In output tables, we can use CLOB as data type for second column only i guess. We can try like this.


Please use schema name and drop all the tables you created.

SET SCHEMA your_schema_name;

DROP TYPE PAL_DT_IRIS_DATA;

CREATE TYPE PAL_DT_IRIS_DATA AS TABLE (

     SEPAL_LENGTH DOUBLE,

     SEPAL_WIDTH DOUBLE,

     PETAL_LENGTH DOUBLE,

     PETAL_WIDTH DOUBLE,

    CLASS VARCHAR(20));

.

.

.

INSERT INTO PAL_DT_IRIS_SIGNATURE VALUES (

1, 'your_schema_name.PAL_DT_IRIS_DATA', 'in');

GRANT SELECT ON your_schema_name. PAL_DT_IRIS_SIGNATURE to SYSTEM;

CALL SYSTEM.AFL_WRAPPER_GENERATOR ('PAL_DT_IRIS', 'AFLPAL', 'CREATEDT', PAL_DT_IRIS_SIGNATURE);

Regards

Raj