XML field truncation

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
joffijoy
Participant
Posts: 22
Joined: Mon Jun 11, 2007 8:51 am

XML field truncation

Post by joffijoy »

Hi,

I have a Job that read XML from a MQ. Size of the XML field is defined as varchar(999999). But I am getting the XML truncated after 100002 Bytes.

Job reads the XML from MQ and writes to a file.

The environment variables I have are:

APT_AUTO_TRANSPORT_BLOCK_SIZE = False
APT_DEFAULT_TRANSPORT_BLOCK_SIZE = 400000
APT_MAX_TRANSPORT_BLOCK_SIZE = 1048576
APT_LATENCY_COEFFICIENT = 5

The XMLs can go up to 6 GB.

What should I do to prevent truncation.

Thank you,
Joffi
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

...hard to tell exactly what might be causing the issue, but two things you should look at:

the max size supported for your MQ queue. Do you have another application capable of browsing the queue? It may already be truncated if the MQ queue is defined too small.

do a test using a Server job......just to see if it's an APT setting problem.

also --- beware that about the largest document you'll be able to process, in general, is 500M.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
joffijoy
Participant
Posts: 22
Joined: Mon Jun 11, 2007 8:51 am

Re: XML field truncation

Post by joffijoy »

joffijoy wrote:Hi,

I have a Job that read XML from a MQ. Size of the XML field is defined as varchar(999999). But I am getting the XML truncated after 100002 Bytes.

Job reads the XML from MQ and writes to a file.

The environment variables I have are:

APT_AUTO_TRANSPORT_BLOCK_SIZE = False
APT_DEFAULT_TRANSPORT_BLOCK_SIZE = 400000
APT_MAX_TRANSPORT_BLOCK_SIZE = 1048576
APT_LATENCY_COEFFICIENT = 5

The XMLs can go up to 6 GB.

What should I do to prevent truncation.

Thank you,
Joffi

Solved the Issue!. It turned out that while defining the column for MQ stage I had less number of bytes that Column size filed. Hard to belive!, but once i changed the display field as that of column size, problem solved.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Well then, you need to mark your post as Resolved as well. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
sud
Premium Member
Premium Member
Posts: 366
Joined: Fri Dec 02, 2005 5:00 am
Location: Here I Am

Re: XML field truncation

Post by sud »

joffijoy wrote:

Solved the Issue!. It turned out that while defining the column for MQ stage I had less number of bytes that Column size filed. Hard to belive!, but once i changed the display field as that of column size, problem solved.
Interesting, so was the data ACTUALLY getting truncated or was it just a view data problem? How were you checking the data?
It took me fifteen years to discover I had no talent for ETL, but I couldn't give it up because by that time I was too famous.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Now that I think about it, I'm fairly certain I recall that the plugin was designed to truncate (as opposed to aborting) if the column(s) were too small, and pad if the column is too big. There were lots of situations early on where sites didn't have all the meta data for their queues or had variable messages with dramatic changes in size from msg to msg....Doing trial and error, while not easy in any situation, is far more difficult if the software complains and dies. So it was decided that it would be more flexible, truncating in case of too short and padding if too long. Too bad it didn't issue a warning while doing so.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Post Reply