Tallan's Technology Blog

Tallan's Top Technologists Share Their Thoughts on Today's Technology Challenges

BizTalk–Seemingly Random Carriage Returns in Flat File Output

Kevin Morillo

A few days ago I was troubleshooting an odd error in one of our pipe delimited flat file outputs from a map.  The application was just migrated from BizTalk 2004 to BizTalk 2010, and had developed a unique problem.  This file was showing what seemed like random carriage returns in the output flat file.

After ruling out any errors with the generic flat file assembly pipeline or map, I pinpointed the issue being spaces contained within the input to one of the maps.  The input comes from a WCF SQL request-response port, and was contained within the data itself, not artificially inserted by the adapter.  Since I was using default padding (space) for the flat file, a single space in the input XML was causing the flat file send pipeline to interpret the spaces as the start of a new record entry. Below is an example of how the space as showing up within the input file.

<node> </node>

In order to remedy this, I changed the map which was mapping from the WCF-SQL response to the flat file schema by adding an String Left Trim Functoid between the source and destination as so.

image

This allowed the space to be removed, and the data point interpreted as a null value in the output flat file in-between two pipe delimiters.

Related Articles

No comments

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

\\\