Question

Read page type property from a blob using pr_read_from_stream UDF

I have a requirement to extract page type property for a work object from the blob stored in the database using  pr_read_from_stream UDF or through any other method that can be used through a RDB methods from PEGA.

Please note that in my case since the assignment has been corrupted.Iam not able to use Obj methods for extracting the properties.

I am also able to get the values of the  single properties (top level or within a page) with the query given below:-

Select pr_read_from_stream("PROPERTY",pzInsKey,pzpvstream) from TABLE

But how can i get the whole page property?Pls suggest

**Updated by Moderator: Marissa. Removed user added Ask the Expert and #helpme group tags. Apologies for confusion, shouldn't have been an end-user option***

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Correct Answer
September 9, 2016 - 9:31am

Hi Kahym,

It looks like you looking for the property "Active" in the BLOB. Few questions

  1. Does the property Active exist in the BLOB for this pzInsKey? You can verify that by doing an Obj-Open-By-Handle for this instance and checking on the clipboard viewer.
  2. The property name (in this case Active) should be provided in the exact case as defined in the application. Is that the case here?
  3. Are you getting null if you tried to use pzInsKey instead of Active in the pr_read_from_stream function?

-Rajiv

Comments

Keep up to date on this post and subscribe to comments

September 1, 2016 - 11:45am

I am using Pega 7.1.7

Pega
September 2, 2016 - 2:51am

Select pr_read_from_stream("PROPERTY",pzInsKey,pzpvstream) from TABLE

Change the above to Select pr_read_from_stream(".pagepropertyname.propertyname", pzInsKey, pzPVStream) from TABLE

If you do want to get scalar properties, then you can use the report definition rule to refer to the unexposed embedded page property and it will internally use the UDFs.

Pega
September 9, 2016 - 9:10am
Response to nistr

Hi,

I am also trying to get unexposed properties from the BLOB however I keep getting null. What am I doing wrong?

select pr_read_from_stream('Active', pzInsKey, pzPVStream)
from PEGAMARKETRULES.pr4_rule where pzinskey = 'RULE-DECISION-DECISIONPARAMETERS ISBANK-NBAFW-SR-DRNVEKAR-BNKCLIKHZM BNKCLIKHZM #20160826T132146.021 GMT' ;

Please help !

 

Thanks

 

Pega
September 9, 2016 - 9:31am
Response to kahym

Hi Kahym,

It looks like you looking for the property "Active" in the BLOB. Few questions

  1. Does the property Active exist in the BLOB for this pzInsKey? You can verify that by doing an Obj-Open-By-Handle for this instance and checking on the clipboard viewer.
  2. The property name (in this case Active) should be provided in the exact case as defined in the application. Is that the case here?
  3. Are you getting null if you tried to use pzInsKey instead of Active in the pr_read_from_stream function?

-Rajiv

Pega
September 26, 2016 - 2:37am
Response to nistr

Hello Rajiv,

Thanks for the answer,

Here are my responses:

 

  1. Does the property Active exist in the BLOB for this pzInsKey? You can verify that by doing an Obj-Open-By-Handle for this instance and checking on the clipboard viewer.
  • I Have shared the Print Screen.
  1. The property name (in this case Active) should be provided in the exact case as defined in the application. Is that the case here?
  • Yes
  1. Are you getting null if you tried to use pzInsKey instead of Active in the pr_read_from_stream function?
  • No, I do get the pzInsKey

Pega
September 28, 2016 - 7:55am
Response to kahym

I Have shared the Print Screen.

The print screen is not showing "Active" property in the clipboard viewer snapshot. 

September 13, 2016 - 9:01am
Response to nistr

Thanks for Replying.

But is there any way to read properties within a page by just specifying the pagename as in the case of the pagegroup is dynamic where its subscript is not constant and keeps changing.

I wanted to create a clone of the old work object so I need all the property values.

Pls help and thanks in advance!! 

Pega
September 28, 2016 - 8:07am
Response to SatyajitS

As of now, there is no way to get this data from the UDF in the database. The only option is to use obj-open (or obj-open-by-handle) from within the Pega platform.

That said, what would be the usecase of getting all properties from a pagegroup using an UDF?

Pega
October 4, 2016 - 6:38am
Response to nistr

Hi,

Since these values are help in a DecisionData, we are unable to "Optimize" the Properties to expose them. Since we can see the Object in the DB, I was wondering if it was possible to somehow reach the data.

 

Pega
October 4, 2016 - 8:42am
Response to kahym

Since these values are help in a DecisionData, we are unable to "Optimize" the Properties to expose them.

I am not sure I understand the above statement and why optimize (declare index or column optimization) wouldn't work. 

Pega
October 7, 2016 - 8:18am
Response to nistr

Hi,

The requirement is to extract proposition metadata to an open datamodel so that customer can create its own reports. Pega Marketing Interacton History is open i.e. it can be quired via plain SQL. However, same cannot be applied for proposition metadata. Therefore, customer wonders if decision datastore can be queired. Apparently, only way to read that data is to write a custom Activity in Pega or extract it to an open schema via BIX.

Regards,

Pega
October 7, 2016 - 9:20am
Response to cavlo

If the intent is to extract data from the BLOB for reporting (BI), then BIX is the right solution to use.