Skip to Content
0

Smart Data Streaming is not Updating Hana Table due to trigger.

Jan 03, 2017 at 06:34 AM

144

avatar image

Hi All,

I am implementing a Streaming Project.

My requirement is to update one filed by calculating wrt to my business logic.

This Calculation is to be performed after Inserting record into Hana DB.

For this i wrote a trigger which is working pretty fine.

Now i need to update HANA Table through Smart Data Streaming.When am trying to upload a file through SDS it is not updating the Target Table.But when am removing the trigger and running my SDS Project it is Updating the HANA Table.

Here now i need a suggestion from SDS Experts.

Like am performing some calculations through triggger.Is there any way where in i can circumvent the trigger and write the respective logic in SDS and go ahead.

Looking forward for reply.

Any help would be highly appreciated.

Regards,

Shekar.

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

3 Answers

Best Answer
Jeff Wootton
Jan 04, 2017 at 04:39 PM
0

The log indicates a mapping problem - probably inconsistent datatypes between the SDS output stream and the HANA table you are trying to write to. This is the message I see in the log file:

Source stream column "DATE_TIMESTAMP_T" should not be mapped to the timestamp column "DATE_TIMESTAMP_T".
Adapter failed to start because initialization failed

Can you explain the logic you want to implement in CCL? You say: "need to calculate the difference between two latest dates and two latest increment values and i need to perform some calculation and update SpeedCal Col", but what do the events look like? and are they keyed? or is it just a single stream of events?

Please post a new question (since this isn't from "not updating HANA table due to trigger". Please describe the fields (columns) in the incoming events, which two events to compare, and what you want to calculate. And I'll be happy to show you how

Share
10 |10000 characters needed characters left characters exceeded
Jeff Wootton
Jan 03, 2017 at 05:08 PM
0

I don't know of any reason that the SDS writes to HANA would fail just because you've added a trigger on the HANA table. Suggest you check the project logs to see if there's info on why the writes are failing. See this for how to troubleshoot.

But if the calculation you are performing is one that can be done in SDS, performing the calc in SDS before writing to HANA will be more efficient.

Share
10 |10000 characters needed characters left characters exceeded
Mantri Shekar Jan 04, 2017 at 06:32 AM
0

Hi Jeff Wootton,

Thanks a lot for your instant reply.

I am newbie to Smart Data Streaming.

I am unaware what the log has been writing.

Could you please check this log and let me know where am i missing some thing.

After deleting the trigger my code is working fine.But am unaware how to write the similar Logic in Smart Data Streaming.

Date Increment SpeedCal

Fri Dec 30 2016 10:38:06 GMT+0000 (UTC) 1

Fri Dec 30 2016 10:38:16 GMT+0000 (UTC) 2

Now i need to calculate the difference between two latest dates and two latest increment values and i need to perform some calculation and update SpeedCal Col.

Could you please let me know is there anyway where in we can do this calculation in SDS by circumventing Trigger.

trace.txt


trace.txt (12.3 kB)
Share
10 |10000 characters needed characters left characters exceeded