Question
Cognizant
IN
Last activity: 15 Jun 2024 7:25 EDT
How can a RD fetch data even from BLOB when the column is unexposed.
How a Report Definition rule is able to read data from BLOB eventhough it throws a warning while giving a warning that the property is not optimised how it still manages to get the data.
-
Reply
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 15 Jun 2024 7:25 EDT
Tata Consultancy Services
IN
Hi @TanyaS58,
First Process Commander Check if the column exists or not in the table.
If it is not an available column in the table, Process Commander will generate the stream query (pr_read_from_stream) and fetch the record from the BLOB
Note: While fetching a record from the table, it will take extra time compared to the exposed column.
So that , We have to expose a column must, while using the properties into the Report Definition.
You can trace the from Tracer, You will get to know.
Here I have added 4 Columns, pyID and LastName Exposed Columns.
FirstName and State these both are not exposed properties. So that Process commander, Fetch the record from the BLOB by generating the Stream Query
SELECT "PC0"."pyid" AS "pyID" , data.pr_read_from_stream('.FirstName', "PC0".pzInsKey, "PC0".pzPVStream) AS "FirstName" , "PC0"."lastname" AS "LastName" , data.pr_read_from_stream('.State', "PC0".pzInsKey, "PC0".pzPVStream) AS "State" , "PC0"."pzinskey" AS "pzInsKey" FROM data.pc_LIC_FW_LICInsur_Work "PC0" WHERE "PC0"."pxobjclass" LIKE ?
Add two columns, One Exposed Column and One Un Exposed Column, So that you get clear picture.
I hope it will help you.
Thanks,
Ashok
TCS
IN
@TanyaS58 RD will fetch the data without expose a column it will decrypt the data from blob and show it you, But this not a best practice that why Pega throws a warning. Example: let say if have 1 lakh records in database table to decrypt 1 lakh records from table take some time so it will be performance issue.
Rulesstack Private Limited
IN
Hi @TanyaS58
Report Definition rule in Pega can read data from a BLOB even if the properties are not optimized. While this approach works, it may result in slower performance due to the overhead of deserializing the BLOB for each row. Pega gives a warning to encourage property optimization, which improves query efficiency and overall system performance.
Thanks,
Ajay Kumar.
Cognizant
IN
@Ajay Kumar Atmakur but how it can read through blob?
Rulesstack Private Limited
IN
When a Report Definition is executed in Pega, the system retrieves data from the specified data source, such as the PegaRULES database. The data stored in the BLOB is serialized (converted into a structured format) during storage. During report execution, the system deserializes this data (converts it back to its original format) to make it usable for reporting purposes. Deserialization involves interpreting the serialized data and converting it into meaningful results that can be displayed in the report. This allows Pega to access and present properties stored within the BLOB, even if they are not exposed as individual database columns.
Thanks
Ajay
Updated: 14 Jun 2024 9:11 EDT
Cotiviti
IN
@TanyaS58 Since you have tagged me by mistake. Let me give some information. I think you are asking how Pega reads the blob. If you on the Tracer keeping DB Query settings on, while running the Report Def, you can get the SQL query generated by the report definition. SQL query will look something like below.
SELECT "PC0"."pyid" AS "pyID" , "PC0"."pzinskey" AS "pzInsKey" , ... more properties
data.pr_read_from_stream('.Value', "PC0".pzInsKey, "PC0".pzPVStream) AS "Value"
FROM data.yourworktable "PC0"
This pr_read_from_stream is a SQL function which extracts the given property (eg .Value) from the pzPVStream column. This function will be substituted for those properties which are not optimized. I hope this helps.
Accepted Solution
Updated: 15 Jun 2024 7:25 EDT
Tata Consultancy Services
IN
Hi @TanyaS58,
First Process Commander Check if the column exists or not in the table.
If it is not an available column in the table, Process Commander will generate the stream query (pr_read_from_stream) and fetch the record from the BLOB
Note: While fetching a record from the table, it will take extra time compared to the exposed column.
So that , We have to expose a column must, while using the properties into the Report Definition.
You can trace the from Tracer, You will get to know.
Here I have added 4 Columns, pyID and LastName Exposed Columns.
FirstName and State these both are not exposed properties. So that Process commander, Fetch the record from the BLOB by generating the Stream Query
SELECT "PC0"."pyid" AS "pyID" , data.pr_read_from_stream('.FirstName', "PC0".pzInsKey, "PC0".pzPVStream) AS "FirstName" , "PC0"."lastname" AS "LastName" , data.pr_read_from_stream('.State', "PC0".pzInsKey, "PC0".pzPVStream) AS "State" , "PC0"."pzinskey" AS "pzInsKey" FROM data.pc_LIC_FW_LICInsur_Work "PC0" WHERE "PC0"."pxobjclass" LIKE ?
Add two columns, One Exposed Column and One Un Exposed Column, So that you get clear picture.
I hope it will help you.
Thanks,
Ashok