Skip to main content

Hi,

In my pipeline Stop Event I’m trying to execute the a custom query with the following logic:

UPDATE test_schema.request_table set status =’closed’, order_info = ivalue from /order_info field] where request_id = tpipeline parameter req_id]

I’ve managed to use the req_id part well, but I’m not able to get the record value from order_info :(

Here’s what I’ve tried:

This works:

UPDATE test_schema.request_table SET STATUS = 'CLOSED'  WHERE request_id = '${req_id}'

 

But when I try to get the record value into another field, it’s not possible:

UPDATE test_schema.request_table SET STATUS = 'CLOSED', ORDER_INFO='${record:value(‘/ORDER_INFO’)}' WHERE request_id = '${req_id}'

or

UPDATE test_schema.request_table SET STATUS = 'CLOSED', ORDER_INFO='${record:value("/ORDER_INFO")}' WHERE request_id = '${req_id}'

 

Both of them don’t throw an error, but they insert a null value at the column :/

@DanielOliveira , the Stop Event occurs as part of the Pipeline event handling framework and as such it doesn’t have access to any of the data records, which are processed by the data processing threads (pipeline runners). 

Could you expand a bit on what you’re trying to do? Are you trying to get a reference to the latest processed record?


Hi @DanielOliveira, Are you trying pull the ORDER_INFO value for last processed record? Pipeline stop event do not carry any record related data.


@Giuseppe Mura  and @Pradeep the record must exist because it’s being created at the stop event at the http client response
 

 


@DanielOliveira 

  1. How did you configure UPDATE query to run? Is it from the settings of pipeline ‘Stop Event’? 

     

  2. If possible can you export the pipeline and share with us to take a look?


Reply