Question


Areteans
IN
Last activity: 27 Jun 2018 4:26 EDT
Pega UDF to write directly to BLOB
There are some Pega UDF (pr_read_from_stream,pr_read_int_from_stream etc.) present to read directly from BLOB. Is any UDF present to write directly to BLOB without affecting the column value?
To explain it more elaborately - say we have a column col1 having value 'x' in it. We want to update col1 in pzpvstream with value 'y' without changing the column col1 value.
Is there any UDF present to do this? Or is there any other way to do this?
Thanks!
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!


Pegasystems Inc.
US
What is the use case for wanting to do this? You should never want to have your exposed columns be out of sync with the blob content.


Areteans
IN
Yes ideally we don't want exposed column to be out of sync with blob content. However from Pega if we want to save some value which is exceeding the column size, Pega truncates the data to the column width minus 1, adds a plus sign (+) to the end of the value, and saves the revised data to the column and the blob corresponding to that column holds the entire value. In this scenario there will be mismatch in column and blob content.
This truncation by Pega fails if the value contains any multi-byte characters. So we are trying to mimic the behavior by truncating the data to the allowable size of the column and save it and save the entire value to the blob. While showing the data we'll be fetching from blob so that there is no data loss.


Pegasystems Inc.
IN
Hi There,
There is no standard way to do this I would believe.
However if you would still like to do this, change the name of the column from DB end, then unoptimize the exposed properties and update the BLOB from PRPC itself using OBJ SAVE.
Post that reoptimize the properties and it should be done.
Regards,
Ujjwal


Areteans
IN
Hi Ujjwal,
Can you please elaborate more on the suggestion? I'm not getting how to follow the steps each time I save a value to DB.
Regards,
Partha


Pegasystems Inc.
IN
Yes, we too faced an issue with multi byte character data while storing in the exposed columns.
I dont think we have any UDF's to update the blob directly and its not a recommended approach as well. Only way is to not use the column data directly and instead depend on obj-open to get the complete data. In short, having the exposed column wouldn't help much in this usecase.


Areteans
IN
Okay. So what I understood here is, to fix it I need to drop the column!! Is there any other graceful to fix this issue?
-
Sabry Ashroff


Areteans
IN
Found a probable solution of this multi byte character issue - change the DDL to modify the column from VARCHAR2(BYTE) to VARCHAR2(CHAR). It will allow multi byte characters and if the char count exceeds Pega will truncate the value gracefully.