Skip to Content
0

how to convert streaming data type on SDS?

Oct 26, 2016 at 11:21 AM

87

avatar image

Hi experts,

I have tried to insert streaming data by using SDS.

When I have converted String type to Decimal type on SDS through WebSocket, error occurred.

I wrote “to_decimal ( to_integer ( SENSORDATA.SENSOR_VALUE ) , 6 , 0 )”.

When SENSORDATA.SENSOR_VALUE is “1” , its OK.

When SENSORDATA.SENSOR_VALUE is “0” , the error occurs on SDS as follows:

----

[27005]{-1}[-1/-1] 2016-10-26 09:20:51.179000 e Streaming UNKNOWN : [SP-3-148015] (23.367) sp(26931) ConnectionWriter(JoinData) error writing to Connection(HANA_Output1): 2016-10-26 09:20:51 An error occurred when setting the value for a decimal database column. Table: IOT.T_SENSOR_VAL_SECOND; Column: SENSOR_VAL_DECIMAL; Original error code: -1.. 1 records posted, 1 processed, 1 bad, 0 good.

----

Regards,

---Added informations

Hi Masayuki,

Thank you for your response.

I attache the files when I found the error.

socket2dbadapterccrfile.txt

socket2dbadapterccxfile.txt

* I wrote the code on text file sinse I couldn't attache the ccr file and ccx file.

Regards,

Marie Moro

10 |10000 characters needed characters left characters exceeded

Hi Marie,

Please share the testable sample code to reproduce the error.

Regards,

Masa / SAP Technology RIG

1
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Marie Moro Oct 29, 2016 at 08:07 PM
0

I'm sorry,

I attache the files again.

socket2dbadapterccrfile.txt

socket2dbadapterccxfile.txt

Regards,

Marie Moro


Share
10 |10000 characters needed characters left characters exceeded
Masayuki Sekihara
Nov 07, 2016 at 03:49 AM
0

Hi Marie,

You can create a customer incident, if it is a bug.

Is there anyway for adding a workaround code to skip the issue if the value is 0?

Regards,

Masa / SAP Technology RIG

Share
10 |10000 characters needed characters left characters exceeded
Marie Moro Nov 08, 2016 at 11:24 AM
0

Hi Masayuki,

Thank you for your response.

I understand that you said.

In terms of how to skip the issue, I have tried the code as follows, but it couldn't skip the issue:

case when SENSORDATA.SENSOR_VAL_CHAR = '0' then 0 else to_decimal(to_integer(SENSORDATA.SENSOR_VAL_CHAR), 6, 0)) end

When I input JoinData to File/Hadoop CSV Output, "0" was output. So with JoinData, we could insert "0" as decimal value.

But, with Hana Output, if we insert "0", it would call the error...

If you have any idea, I would like you to give us your advice.

Sorry to bother you again.

Regards,

Marie Moro

Share
10 |10000 characters needed characters left characters exceeded