cancel
Showing results for 
Search instead for 
Did you mean: 

Does boolean data type work in HANA Views?

priyanka_sadana2
Explorer
0 Kudos

Assigning data type boolean to an input parameter in HANA Calculation view throws the following error:

Error: SAP DBTech JDBC: [2048]: column store error: search table error: [34023] Instantiation of calculation model failed; exception 306002: An internal error occurred.

But, it works using interger for the same purpose instead of boolean and assigning values as 1 and 0.

Accepted Solutions (1)

Accepted Solutions (1)

lbreddemann
Active Contributor
0 Kudos

UPDATE:

Ok, I got around to quickly check this on my SPS12 system.

My calc view projects one column of a table plus one calculated column (expression) that prints a different string depending on the boolean input parameter.

When I try to run the statement that the view modeler creates for me, this fails:

SELECT
     "DAT",
     "calcexp" 
FROM "_SYS_BIC"."sandpit/boolParam"
     ('PLACEHOLDER' = ('$ip_bool$','true'))
SAP DBTech JDBC: [2048]: column store error: search table error: [34023] Instantiation of calculation model failed;exception 306002: An internal error occurred

BUT(!) when I use the "new" parameter syntax, the view works just fine:

SELECT 
      "DAT",
      "calcexp" 
FROM "_SYS_BIC"."sandpit/boolParam" 
          (PLACEHOLDER."$ip_bool$"=> true);
DAT            calcexp 
B.765973.01.01   YAY 
B.76512345       YAY 
B.98723.01.02.03 YAY 

The technical reason here is that the "old" parameter syntax only takes in strings (great work, stringified architecture designers ).

Why on earth nobody bothered to change the generated SQL for calcviews, explain this stuff in the documentation or make it obvious is beyond me.

I still consider this to be a bug - but a bug with a work around.
----

hmm Boolean data types have been added rather late into HANA. Could be that the calculator engine doesn't natively support it... have you checked SAP notes on that?

Other than that it's a bug from my point of view. Correctly activated views should never throw errors when the correct types are used.

Answers (1)

Answers (1)

jyoti_senapati
Participant
0 Kudos

Hi,

Boolean data type is not supported by the calculation engine, you need to convert it into varchar type.

Regards,

Jyoti