Question

3
Replies
22
Views
Close popover
John Bushey (JohnB097)
Computershare
Application Architect
Computershare
US
JohnB097 Member since 2018 16 posts
Computershare
Posted: September 23, 2020
Last activity: October 28, 2020

reading objects

I need a way to read the most recently updated version of a data- instance (the entire blob). Ideally I'd like to do this in one trip to the DB and without having to write some custom java.   In my use case I don't know the specific key of the record.  I know some of the key parts that I can use to query the database.  Proper sorting would let me select the most recently updated record but I'm having  issues finding features to do this.

 Here's what I've been able to do so far.

1. Use obj-browse to select the pzinskey, and RefreshDateTime properties while sorting by RefreshDateTime  in descending order.   Also set the max rows to 1  to avoid pulling back too much data.    Next use obj-open-by-handle to read the record using the pzinskey retrieved by the obj-browse.      This is  high frequency use case so making two trips to the DB to get my data is a huge issue.

 

2. Using obj-browse I can select the entire instance conditionally by date range on RefreshDateTime simply by not checking the "select" checkbox  but the results can't be sorted.   The SQL does not include the "order by" clause.   This negates the ability to sort by RefreshDateTime desc and restrict the number of rows.      In order for this to work I'd have to return more rows  then use obj-sort to pick the most recently updated record.

 

 

 

Pega Platform Data Integration