Question
Fipsar Inc
US
Last activity: 8 Mar 2017 20:37 EST
Reading pzPVStream using Java
Hello,
I have a requirement to read the pzPVStream column from a stand-alone Java application. When I researched a bit about this, I got to know the contents of the column are compressed befored stored into database. Does pega has a detailed documentation of what compression format or algorithm is used? Or is there any Java Public APIs available to extract the individual properties from this column?
Regards,
Vimal
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
US
Hi Vimal,
As per the article https://community.pega.com/support/support-articles/poor-performance-while-adding-attachment which is related to the save of an object, it looks like pega is using DeflaterOutputStream class of JDK to compress the data before storing into the database. Hope this will help you.
Regards,
Mahesh
Pegasystems Inc.
IN
Can you try below:
https://collaborate.pega.com/question/read-data-blob-column-external-db
Pegasystems Inc.
IN
Hello Vimal,
In Pega all the properties are stored in a blob (pzpvstream) .
If you want to extract the contents of the properties from standalone application you need to use BIX.
Bix is shipped by default in PRPC installation media (Additional Products-->BIX) where you have the user guide to start with .
Thanks,
Arun
Pegasystems Inc.
AU
There is a UDF(pr_read_from_stream) for reading specific properties from pzPVStream, however if you intend on retrieving multiple properties this can become very costly.
In that instance, consider alternatives such as BIX.
Accepted Solution
Pegasystems Inc.
US
Hi Vimal,
As per the article https://community.pega.com/support/support-articles/poor-performance-while-adding-attachment which is related to the save of an object, it looks like pega is using DeflaterOutputStream class of JDK to compress the data before storing into the database. Hope this will help you.
Regards,
Mahesh
Fipsar Inc
US
Thanks mahesh86, as your answer helped me to decompress the the pzPVStream column. From the link you shared, it is evident that the pega uses the DeflaterOutputStream class of JDK to compress the data. So, I decompressed the data using the corresponding Inflater class of JDK.
Some additional details to consider if anyone wants to decompress the pzPVStream data using Java. The Inflater object should be created with nowrap argument set to true. The compressed bytes seem to start from the 11th byte of the pzPVStream blob. So, the Inflater object should be given input from the 11th byte of the blob bytes.
Also, BIX package also seem to be a viable solustion. Thanks for everyone who brought it up. But with my current requirements, I have to prefer a solution which does not use BIX package.
Regards,
Vimal
-
ashwin kumar s
Pegasystems Inc.
US
Thanks for sharing this additional information with us Vimal which will be helpful for others.
SINARMASMSIGLIFE
ID
Hi Vimal,
Can you share your code using Java?
Regards,
Alfian