Error updating XML column in DB2
Moderators: chulett, rschirm, roy
Error updating XML column in DB2
Friends,
I have a Parallel Job which is reading data from few tables, creating XML Hierarchy and updating the XML column of a DB2 table on the basis of a key column.
I have set the data type of the XML column as LongVarChar(99999) in the XML Output Stage and in DB2 UDB API Stage.
With this setting, my Job is running successfully and updating the column correctly.
However I want to keep the length as unbounded because the XML can grow beyond the length specified (99999).
When I leave the length as unbounded I get a Fatal error:
1 XML DOCUMENT LENGTH IS ZERO
Can anyone please advise.
regards
I have a Parallel Job which is reading data from few tables, creating XML Hierarchy and updating the XML column of a DB2 table on the basis of a key column.
I have set the data type of the XML column as LongVarChar(99999) in the XML Output Stage and in DB2 UDB API Stage.
With this setting, my Job is running successfully and updating the column correctly.
However I want to keep the length as unbounded because the XML can grow beyond the length specified (99999).
When I leave the length as unbounded I get a Fatal error:
1 XML DOCUMENT LENGTH IS ZERO
Can anyone please advise.
regards
Actually there are multiple xml columns in the table. Hence if I set each to more than 99999 I will have to increase the Block size to a very large number than the present 128 kb which I want to avoid.
Hence I tried to keep it unbounded but then the DB2 Stage is throwing this error.
Friends: Have any one of you faced similar situation where you encounter large xmls to be feed into xml columns. If yes, what do you advise?
The other stages do not seem to bother about the unbounded column however the DB2 Stage is not allowing this.
Thanks.
Hence I tried to keep it unbounded but then the DB2 Stage is throwing this error.
Friends: Have any one of you faced similar situation where you encounter large xmls to be feed into xml columns. If yes, what do you advise?
The other stages do not seem to bother about the unbounded column however the DB2 Stage is not allowing this.
Thanks.
Craig-
If I have to set the block size explicitly to a safe "high" number then I need to increase the length of the xml columns in my job to a high number as well.
The xml columns support 2 GB of XML data and the sum of all those XML columns will be a very big number.
As a last resort I might have to do that, but I would like to know why unbounded columns does not work with XML data in my case and if there is something I can do to resolve this.
If I have to set the block size explicitly to a safe "high" number then I need to increase the length of the xml columns in my job to a high number as well.
The xml columns support 2 GB of XML data and the sum of all those XML columns will be a very big number.
As a last resort I might have to do that, but I would like to know why unbounded columns does not work with XML data in my case and if there is something I can do to resolve this.
To me that's a support question, I for one have no clue. Is that type even officially supported? Not asking whether it 'works' or not... is it supported?saraswati wrote:I would like to know why unbounded columns does not work with XML data
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
using the LOB support (pass long strings by reference)
I have seen very little call for this feature since its inception, but several years ago the Connectors provided DataStage with the ability to handle extremely long strings in a "pass by reference" fashion. I haven't tried it in years, but take a look at this DeveloperWorks article that talks about xml columns in DB2 and the ability to read and write them in DataStage even if they are extremely long.
http://www.ibm.com/developerworks/data/ ... index.html
The LOB (large object) capability is supported via the LongNVarChar datatype within the link, and then via (when writing) the "orchestrate.[column reference] within the applied SQL.
Let us know how it goes. My guess is that the capability depends on the edition of DB2 as well as the release of DataStage.
Ernie
http://www.ibm.com/developerworks/data/ ... index.html
The LOB (large object) capability is supported via the LongNVarChar datatype within the link, and then via (when writing) the "orchestrate.[column reference] within the applied SQL.
Let us know how it goes. My guess is that the capability depends on the edition of DB2 as well as the release of DataStage.
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>