I have a query that is related to this topic: https://developer.jboss.org/thread/277610
Prior to reaching the comma separated values stage, the values are actually stored as a blob. There is a function fetchBlobtoString(Blob, string, VARIADIC start_end integer) returns String that actually takes the blob input and then converts to comma separated values as seen on the post.
The issue with this is string is limited to 4000 characters, hence it will decimate the data and not all values show up. What would be the best way to extract the values that are double and convert it to rows similar to the post.
Would converting it in to an object instead of string improve performance using following function as an example:
fetchElementValueFromBlob(protobufBlob Blob, origName string) returns object
I have tried iterating items in blob using getItem function, add to temp table, but its slow and I get following error If i go more that 15-20 iterations:
Error: TEIID30504 Remote org.teiid.core.TeiidProcessingException: TEIID30504 petrelDS: TEIID60000 javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/petrelDS SQLState: 50000 ErrorCode: 30504
BEGIN
DECLARE integer VARIABLES.counter = 0;
DECLARE integer VARIABLES.pts = 100;
WHILE (VARIABLES.counter < VARIABLES.pts)
BEGIN
select wellbore_uwi,getItem(fetchBlob(data, 'md'),VARIABLES.counter) INTO TEMP from DirectionalSurvey where wellbore_uwi='1234567890';
VARIABLES.counter = (VARIABLES.counter + 1);
END
SELECT TEMP.wb_uwi,TEMP.depth FROM TEMP;
END
If I remove the getItem() function, the error goes away.