BizTalk Server General - How to break up a Flat File into individual files

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > October 2004 > How to break up a Flat File into individual files





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How to break up a Flat File into individual files
RichTheHSTGuy

2004-10-28, 5:49 pm

I have built a schema to take a flat file and convert to xml but what I get
is 1 huge xml instead of individual xml messages. I've enclosed the schema,
what settings do I need to change and/or add to make that happen, breaking it
into individual xml instead of 1 huge 1.

<?xml version="1.0" encoding="utf-16" ?>
- <xs:schema xmlns="http://Centricity_FF.Centricity_FF_schema"
xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
targetNamespace="http://Centricity_FF.Centricity_FF_schema"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <xs:annotation>
- <xs:appinfo>
<b:schemaInfo count_positions_by_byte="false" standard="Flat File"
root_reference="Patient" />
<schemaEditorExtension:schemaInfo namespaceAlias="b"
extensionClass="Microsoft.BizTalk.FlatFileExtension.FlatFileExtension"
standardName="Flat File"
xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions" />
</xs:appinfo>
</xs:annotation>
- <xs:element name="Patient">
- <xs:annotation>
- <xs:appinfo>
<b:recordInfo structure="delimited"
preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false"
sequence_number="1" child_delimiter_type="hex" child_order="postfix"
child_delimiter="0x0D 0x0A" />
</xs:appinfo>
</xs:annotation>
- <xs:complexType>
- <xs:sequence minOccurs="1" maxOccurs="unbounded">
- <xs:annotation>
- <xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
- <xs:element name="Patient_Info" nillable="true">
- <xs:annotation>
- <xs:appinfo>
<b:recordInfo sequence_number="1" structure="delimited"
preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false"
child_delimiter_type="char" child_order="prefix" child_delimiter=","
tag_name="01" />
</xs:appinfo>
</xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:annotation>
- <xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
- <xs:element name="Medical_Rec_Number" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="1" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="Last_Name" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="2" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="First_Name" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="3" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="Street_Address1" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="4" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="Street_Address2" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo justification="left" sequence_number="5" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="City" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="6" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="State" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="7" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="Zip_Code" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="8" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="Home_Phone_Number" nillable="true" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="9" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="Work_Phone_number" nillable="true" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="10" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="SSN" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="11" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="Sex" nillable="true" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="12" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="Date_of_Birth" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="13" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="GT_Last_Name" nillable="true" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="14" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="GT_First_Name" nillable="true" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="15" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="GT_Address1" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="16" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="GT_Address2" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="17" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="GT_City" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="18" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="GT_State" nillable="true" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="19" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="GT_Zip" nillable="true" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="20" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="GT_Home_Phone" nillable="true" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="21" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="GT_Work_Phone" nillable="true" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="22" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="GT_SSN" nillable="true" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="23" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="GT_Relationship" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="24" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="Attending_Doctor_Last_Name" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="25" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="Attending_Doctor_First" nillable="true" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="26" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="Admitting_Doctor" nillable="true" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="27" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="Patient_Employer" nillable="true" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="28" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="Primary_IN_Name" nillable="true" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="29" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="Primary_IN_Address" nillable="true" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="30" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="Primary_IN_City" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="31" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="Primary_IN_State" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="32" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="Primary_IN_Zip" nillable="true" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="33" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="Primary_Insured_Last_Name" nillable="true"
type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="34" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="Primary_Insured_First_Name" nillable="true"
type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="35" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="Primary_IN_ID_Name" nillable="true" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="36" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="Primary_IN_Group_Nbr" nillable="true" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="37" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="Primary_IN_Group_Name" nillable="true" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="38" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="Primary_IN_Carrier_Address" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="39" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
- <xs:element name="Primary_INCarrier_City" type="xs:string">
- <xs:annotation>
- <xs:appinfo>
<b:fieldInfo sequence_number="40" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Mike Jansen

2004-10-28, 5:49 pm

I know how to do this on an XML receive pipeline. I don't know if you can
do the same for a flatfile receive pipeline. But you could do this:

1. Create a Send Port/FILE adapter/XMLSendPipeline that has on its filter
the receiveport that reads in the flat file (so the whole flatfile.XML gets
written to another file)
2. Create a receive port/FILE adapter/custom pipeline. In the custom
pipeline, drop an XMLDisassembler and specify an Envelope Schema and a
Document schema. The envelope schema should be defined as the envelope part
of your big flatfile.XML file. The document schema should be the individual
documents that you want to process. These should be all in one place in
your envelop.

Example:

<bigfile>
<somehierarchy>
<onedoc> ... </onedoc>
<onedoc> ... </onedoc>
</somehierarchy>
</bigfile>

Your envelope schema would define
<bigfile>
<somehierarchy>
<any>
</somehierarchy>
</bigfile>
With a document body xpath of "/bigfile/somehierarchy"

Your document schema would define:
<onedoc>
<etcetc/>
</onedoc>

The result of this will be:

flatfile -> flatfile_recvport -> flatfile.XML -> file send port -> xml
receive port (big file gets split up) -> individual docs

That is, if you subscribe to the receive port that had the custom XML
pipeline, you will be receiving the indivual documents not the big document.

We're currently doing something similar very successfully, but we have flat
file -> recv port -> SQL send port -> SQL recv port w/ envelope schema ->
individual docs. The incoming file is multiple denormalized records.
Sending to SQL and back allows us to normalize and then have individual
messages.

Hope that helps. I know some of the description was scant, but it should be
a start. Let me know if you need more details (or if someone has a better
solution!). The ideal solution is a custom receive pipeline component that
would do the flatfile conversion and envelope/document shredding all in one.
I've experimented with this but haven't had time to work through it.

Mike Jansen
Sr. Software Developer
Prime ProData, Inc.
North Canton, Ohio USA
(mjansen)(at)(primepro-com)



"RichTheHSTGuy" <RichTheHSTGuy@discussions.microsoft.com> wrote in message
news:B779D811-4B13-4698-87A8-7CCE73B8FBD4@microsoft.com...
> I have built a schema to take a flat file and convert to xml but what I

get
> is 1 huge xml instead of individual xml messages. I've enclosed the

schema,
> what settings do I need to change and/or add to make that happen, breaking

it
> into individual xml instead of 1 huge 1.
>
> <?xml version="1.0" encoding="utf-16" ?>
> - <xs:schema xmlns="http://Centricity_FF.Centricity_FF_schema"
> xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
> targetNamespace="http://Centricity_FF.Centricity_FF_schema"
> xmlns:xs="http://www.w3.org/2001/XMLSchema">
> - <xs:annotation>
> - <xs:appinfo>
> <b:schemaInfo count_positions_by_byte="false" standard="Flat File"
> root_reference="Patient" />
> <schemaEditorExtension:schemaInfo namespaceAlias="b"
> extensionClass="Microsoft.BizTalk.FlatFileExtension.FlatFileExtension"
> standardName="Flat File"
>

xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/Schem
aEditorExtensions" />
> </xs:appinfo>
> </xs:annotation>
> - <xs:element name="Patient">
> - <xs:annotation>
> - <xs:appinfo>
> <b:recordInfo structure="delimited"
> preserve_delimiter_for_empty_data="true"

suppress_trailing_delimiters="false"
> sequence_number="1" child_delimiter_type="hex" child_order="postfix"
> child_delimiter="0x0D 0x0A" />
> </xs:appinfo>
> </xs:annotation>
> - <xs:complexType>
> - <xs:sequence minOccurs="1" maxOccurs="unbounded">
> - <xs:annotation>
> - <xs:appinfo>
> <b:groupInfo sequence_number="0" />
> </xs:appinfo>
> </xs:annotation>
> - <xs:element name="Patient_Info" nillable="true">
> - <xs:annotation>
> - <xs:appinfo>
> <b:recordInfo sequence_number="1" structure="delimited"
> preserve_delimiter_for_empty_data="true"

suppress_trailing_delimiters="false"
> child_delimiter_type="char" child_order="prefix" child_delimiter=","
> tag_name="01" />
> </xs:appinfo>
> </xs:annotation>
> - <xs:complexType>
> - <xs:sequence>
> - <xs:annotation>
> - <xs:appinfo>
> <b:groupInfo sequence_number="0" />
> </xs:appinfo>
> </xs:annotation>
> - <xs:element name="Medical_Rec_Number" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="1" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="Last_Name" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="2" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="First_Name" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="3" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="Street_Address1" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="4" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="Street_Address2" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo justification="left" sequence_number="5" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="City" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="6" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="State" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="7" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="Zip_Code" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="8" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="Home_Phone_Number" nillable="true" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="9" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="Work_Phone_number" nillable="true" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="10" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="SSN" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="11" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="Sex" nillable="true" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="12" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="Date_of_Birth" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="13" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="GT_Last_Name" nillable="true" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="14" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="GT_First_Name" nillable="true" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="15" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="GT_Address1" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="16" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="GT_Address2" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="17" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="GT_City" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="18" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="GT_State" nillable="true" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="19" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="GT_Zip" nillable="true" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="20" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="GT_Home_Phone" nillable="true" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="21" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="GT_Work_Phone" nillable="true" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="22" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="GT_SSN" nillable="true" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="23" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="GT_Relationship" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="24" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="Attending_Doctor_Last_Name" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="25" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="Attending_Doctor_First" nillable="true"

type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="26" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="Admitting_Doctor" nillable="true" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="27" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="Patient_Employer" nillable="true" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="28" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="Primary_IN_Name" nillable="true" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="29" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="Primary_IN_Address" nillable="true" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="30" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="Primary_IN_City" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="31" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="Primary_IN_State" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="32" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="Primary_IN_Zip" nillable="true" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="33" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="Primary_Insured_Last_Name" nillable="true"
> type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="34" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="Primary_Insured_First_Name" nillable="true"
> type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="35" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="Primary_IN_ID_Name" nillable="true" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="36" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="Primary_IN_Group_Nbr" nillable="true"

type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="37" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="Primary_IN_Group_Name" nillable="true"

type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="38" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="Primary_IN_Carrier_Address" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="39" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> - <xs:element name="Primary_INCarrier_City" type="xs:string">
> - <xs:annotation>
> - <xs:appinfo>
> <b:fieldInfo sequence_number="40" justification="left" />
> </xs:appinfo>
> </xs:annotation>
> </xs:element>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:schema>



Stephen W. Thomas

2004-10-28, 5:49 pm

I too have tried to get this to work in one single Receive Pipeline with no
luck.

An alterative approach to multi send and receive ports would be to use an
Orchestration to loop through the values inside the XML message using XPath.
A good example of this is here:
http://blogs.msdn.com/darrenj/archi.../30/222614.aspx

I think either one would accomplish what you want.

Stephen W. Thomas
http://www.geekswithblogs.net/sthomas


"Mike Jansen" wrote:

> I know how to do this on an XML receive pipeline. I don't know if you can
> do the same for a flatfile receive pipeline. But you could do this:
>
> 1. Create a Send Port/FILE adapter/XMLSendPipeline that has on its filter
> the receiveport that reads in the flat file (so the whole flatfile.XML gets
> written to another file)
> 2. Create a receive port/FILE adapter/custom pipeline. In the custom
> pipeline, drop an XMLDisassembler and specify an Envelope Schema and a
> Document schema. The envelope schema should be defined as the envelope part
> of your big flatfile.XML file. The document schema should be the individual
> documents that you want to process. These should be all in one place in
> your envelop.
>
> Example:
>
> <bigfile>
> <somehierarchy>
> <onedoc> ... </onedoc>
> <onedoc> ... </onedoc>
> </somehierarchy>
> </bigfile>
>
> Your envelope schema would define
> <bigfile>
> <somehierarchy>
> <any>
> </somehierarchy>
> </bigfile>
> With a document body xpath of "/bigfile/somehierarchy"
>
> Your document schema would define:
> <onedoc>
> <etcetc/>
> </onedoc>
>
> The result of this will be:
>
> flatfile -> flatfile_recvport -> flatfile.XML -> file send port -> xml
> receive port (big file gets split up) -> individual docs
>
> That is, if you subscribe to the receive port that had the custom XML
> pipeline, you will be receiving the indivual documents not the big document.
>
> We're currently doing something similar very successfully, but we have flat
> file -> recv port -> SQL send port -> SQL recv port w/ envelope schema ->
> individual docs. The incoming file is multiple denormalized records.
> Sending to SQL and back allows us to normalize and then have individual
> messages.
>
> Hope that helps. I know some of the description was scant, but it should be
> a start. Let me know if you need more details (or if someone has a better
> solution!). The ideal solution is a custom receive pipeline component that
> would do the flatfile conversion and envelope/document shredding all in one.
> I've experimented with this but haven't had time to work through it.
>
> Mike Jansen
> Sr. Software Developer
> Prime ProData, Inc.
> North Canton, Ohio USA
> (mjansen)(at)(primepro-com)
>
>
>
> "RichTheHSTGuy" <RichTheHSTGuy@discussions.microsoft.com> wrote in message
> news:B779D811-4B13-4698-87A8-7CCE73B8FBD4@microsoft.com...
> get
> schema,
> it
> xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/Schem
> aEditorExtensions" />
> suppress_trailing_delimiters="false"
> suppress_trailing_delimiters="false"
> type="xs:string">
> type="xs:string">
> type="xs:string">
>
>
>

Greg Forsythe

2004-10-29, 7:46 am

Try resetting the "Group Min Occurs" and "Group Max Occurs" properties on
the Patient element
i.e. each document contains 1 patient record.
And specify the document type in the document property of the Flat File
disassembler of your custom pipeline.
Should get one file in and multiple files out - I have tested this and it
seems to work ok.

Greg

"Stephen W. Thomas" <StephenWThomas@discussions.microsoft.com> wrote in
message news:44A05657-FFB0-4E75-8DC0-DF0741227403@microsoft.com...
> I too have tried to get this to work in one single Receive Pipeline with

no
> luck.
>
> An alterative approach to multi send and receive ports would be to use an
> Orchestration to loop through the values inside the XML message using

XPath.[vbcol=seagreen]
> A good example of this is here:
> http://blogs.msdn.com/darrenj/archi.../30/222614.aspx
>
> I think either one would accomplish what you want.
>
> Stephen W. Thomas
> http://www.geekswithblogs.net/sthomas
>
>
> "Mike Jansen" wrote:
>
can[vbcol=seagreen]
filter[vbcol=seagreen]
gets[vbcol=seagreen]
part[vbcol=seagreen]
individual[vbcol=seagreen]
document.[vbcol=seagreen]
flat[vbcol=seagreen]
schema ->[vbcol=seagreen]
should be[vbcol=seagreen]
better[vbcol=seagreen]
that[vbcol=seagreen]
one.[vbcol=seagreen]
message[vbcol=seagreen]
I[vbcol=seagreen]
breaking[vbcol=seagreen]
xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/Schem[vbcol=seagreen]
type="xs:string">[vbcol=seagreen]
type="xs:string">[vbcol=seagreen]
type="xs:string">[vbcol=seagreen]
type="xs:string">[vbcol=seagreen]
type="xs:string">[vbcol=seagreen]
type="xs:string">[vbcol=seagreen]


Greg Forsythe

2004-10-29, 7:46 am

Try resetting the "Group Min Occurs" and "Group Max Occurs" properties on
the Patient element
i.e. each document contains 1 patient record.
And specify the document type in the document property of the Flat File
disassembler of your custom pipeline.
Should get one file in and multiple files out - I have tested this and it
seems to work ok.

Greg


"Stephen W. Thomas" <StephenWThomas@discussions.microsoft.com> wrote in
message news:44A05657-FFB0-4E75-8DC0-DF0741227403@microsoft.com...
> I too have tried to get this to work in one single Receive Pipeline with

no
> luck.
>
> An alterative approach to multi send and receive ports would be to use an
> Orchestration to loop through the values inside the XML message using

XPath.[vbcol=seagreen]
> A good example of this is here:
> http://blogs.msdn.com/darrenj/archi.../30/222614.aspx
>
> I think either one would accomplish what you want.
>
> Stephen W. Thomas
> http://www.geekswithblogs.net/sthomas
>
>
> "Mike Jansen" wrote:
>
can[vbcol=seagreen]
filter[vbcol=seagreen]
gets[vbcol=seagreen]
part[vbcol=seagreen]
individual[vbcol=seagreen]
document.[vbcol=seagreen]
flat[vbcol=seagreen]
schema ->[vbcol=seagreen]
should be[vbcol=seagreen]
better[vbcol=seagreen]
that[vbcol=seagreen]
one.[vbcol=seagreen]
message[vbcol=seagreen]
I[vbcol=seagreen]
breaking[vbcol=seagreen]
xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/Schem[vbcol=seagreen]
type="xs:string">[vbcol=seagreen]
type="xs:string">[vbcol=seagreen]
type="xs:string">[vbcol=seagreen]
type="xs:string">[vbcol=seagreen]
type="xs:string">[vbcol=seagreen]
type="xs:string">[vbcol=seagreen]


Mike Jansen

2004-10-29, 7:46 am

Hi Greg,

I would really like to understand better how you got that to work. That
would save a lot of extra pieces. Could you give some more details on how
you made the flat file schema / flat file disassembler shred the main
message into multiple messages? From what it sounds like, it has the same
effect as an envelope schema on the XML Disassembler.

Thanks,
Mike

"Greg Forsythe" <greg.forsythe@unisys.com> wrote in message
news:uEvOCJavEHA.1988@TK2MSFTNGP12.phx.gbl...
> Try resetting the "Group Min Occurs" and "Group Max Occurs" properties on
> the Patient element
> i.e. each document contains 1 patient record.
> And specify the document type in the document property of the Flat File
> disassembler of your custom pipeline.
> Should get one file in and multiple files out - I have tested this and it
> seems to work ok.
>
> Greg
>
>
> "Stephen W. Thomas" <StephenWThomas@discussions.microsoft.com> wrote in
> message news:44A05657-FFB0-4E75-8DC0-DF0741227403@microsoft.com...
> no
an[vbcol=seagreen]
> XPath.
> can
> filter
> gets
envelope[vbcol=seagreen]
> part
> individual
in[vbcol=seagreen]
> document.
> flat
> schema ->
individual[vbcol=seagreen]
> should be
> better
> that
in[vbcol=seagreen]
> one.
> message
what[vbcol=seagreen]
> I
> breaking
extensionClass="Microsoft.BizTalk.FlatFileExtension.FlatFileExtension"[vbcol=seagreen]
>

xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/Schem
> type="xs:string">
> type="xs:string">
> type="xs:string">
> type="xs:string">
type="xs:string">[vbcol=seagreen]
> type="xs:string">
type="xs:string">[vbcol=seagreen]
> type="xs:string">
>
>



RichTheHSTGuy

2004-10-29, 5:49 pm

Got it to work but can't find how to change the document type as 1 of Greg's
suggestion said. What I find amazing is in the SDK this is how the straight
flat file dissaembler works with no envelope.

"Mike Jansen" wrote:

> Hi Greg,
>
> I would really like to understand better how you got that to work. That
> would save a lot of extra pieces. Could you give some more details on how
> you made the flat file schema / flat file disassembler shred the main
> message into multiple messages? From what it sounds like, it has the same
> effect as an envelope schema on the XML Disassembler.
>
> Thanks,
> Mike
>
> "Greg Forsythe" <greg.forsythe@unisys.com> wrote in message
> news:uEvOCJavEHA.1988@TK2MSFTNGP12.phx.gbl...
> an
> envelope
> in
> individual
> in
> what
> extensionClass="Microsoft.BizTalk.FlatFileExtension.FlatFileExtension"
> xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/Schem
> type="xs:string">
> type="xs:string">
>
>
>

Greg Forsythe

2004-10-29, 5:49 pm


Basically your document schema just declares one record, and the FF
Disassembler will loop around the input message creating output messages for
each record it finds.
Once you have created the schema, if you do a "Validate Instance" on a
multi-record file - the resulting output should have just one record.

This works with a header and trailer as well, you need to declare one schema
for header, trailer and document and set up the FF Disassembler pipeline
component with the appropriate schemas.
Testing this scenario is slightly more complex - you can use "Validate
Instance" on specially create file fragments or use FFDasm.exe.

One thing I haven't tried is a multi-line record in the flat file but this
should work just as well.

Greg

"Mike Jansen" <mjansen_nntp@mail.com> wrote in message
news:udH5LpbvEHA.2876@TK2MSFTNGP12.phx.gbl...
> Hi Greg,
>
> I would really like to understand better how you got that to work. That
> would save a lot of extra pieces. Could you give some more details on how
> you made the flat file schema / flat file disassembler shred the main
> message into multiple messages? From what it sounds like, it has the same
> effect as an envelope schema on the XML Disassembler.
>
> Thanks,
> Mike
>
> "Greg Forsythe" <greg.forsythe@unisys.com> wrote in message
> news:uEvOCJavEHA.1988@TK2MSFTNGP12.phx.gbl...
on[vbcol=seagreen]
it[vbcol=seagreen]
with[vbcol=seagreen]
> an
you[vbcol=seagreen]
flatfile.XML[vbcol=seagreen]
custom[vbcol=seagreen]
a[vbcol=seagreen]
> envelope
place[vbcol=seagreen]
> in
xml[vbcol=seagreen]
XML[vbcol=seagreen]
have[vbcol=seagreen]
records.[vbcol=seagreen]
> individual
component[vbcol=seagreen]
> in
> what
the[vbcol=seagreen]
File"[vbcol=seagreen]
> extensionClass="Microsoft.BizTalk.FlatFileExtension.FlatFileExtension"
>

xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/Schem
child_order="postfix"[vbcol=seagreen]
child_delimiter=","[vbcol=seagreen]
type="xs:string">[vbcol=seagreen]
type="xs:string">[vbcol=seagreen]
type="xs:string">[vbcol=seagreen]
type="xs:string">[vbcol=seagreen]
> type="xs:string">
> type="xs:string">
>
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com