Comma delimited flat file schema with comma field data

I put in some hours on a BizTalk project this morning that had to consume comma delimited flat files that included commas in field data.

Our data looked a bit like this,

field1_data, field2_data, “field3_data, field3_extradata”, field4_data

Using the flat file wizard from Visual Studio we quickly built a simple flat file schema.  Quick tip, look at the wrap character functionality for flat file schemas.  When a csv is saved from for example Microsoft Excel, if it contains a comma in the field data it will wrap the field in quotes.  The BizTalk flat file schema functionality allows us to specify a wrap character.  At run time the flat file disassembler and assembler use the wrap character on the schema nodes so that commas in field data are treated as field data and not delimiters.

Advertisements
This entry was posted in BizTalk Server. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s