RE: FlatFile, Custom Pipeline: Missing Data

Tech-Archive recommends: Speed Up your PC by fixing your registry



Hi Steven,

Have a look at the following schema:

<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003";
xmlns="http://BizTalkServerProject1.FlatFileSchema3";
targetNamespace="http://BizTalkServerProject1.FlatFileSchema3";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<xs:annotation>
<xs:appinfo>
<schemaEditorExtension:schemaInfo namespaceAlias="b"
extensionClass="Microsoft.BizTalk.FlatFileExtension.FlatFileExtension"
standardName="Flat File"
xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions"; />
<b:schemaInfo standard="Flat File" codepage="65001" default_pad_char="
" count_positions_by_byte="false" parser_optimization="speed"
lookahead_depth="3" suppress_empty_nodes="false" generate_empty_nodes="true"
allow_early_termination="false" early_terminate_optional_fields="false"
allow_message_breakup_of_infix_root="false" compile_parse_tables="false"
root_reference="Record" />
</xs:appinfo>
</xs:annotation>
<xs:element name="Record">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="hex"
child_delimiter="0xD 0xA" child_order="postfix" sequence_number="1"
preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false"
/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence maxOccurs="1">
<xs:annotation>
<xs:appinfo>
<groupInfo sequence_number="0"
xmlns="http://schemas.microsoft.com/BizTalk/2003"; />
</xs:appinfo>
</xs:annotation>
<xs:element name="Person">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited"
child_delimiter_type="char" child_delimiter="|" child_order="infix"
sequence_number="1" preserve_delimiter_for_empty_data="true"
suppress_trailing_delimiters="false" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:annotation>
<xs:appinfo>
<groupInfo sequence_number="0"
xmlns="http://schemas.microsoft.com/BizTalk/2003"; />
</xs:appinfo>
</xs:annotation>
<xs:element name="Title" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="Forename" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="2" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="Surname" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="3" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

You will see a slight difference to yours mainly in that there is a root
then a record and the root has a group max occurs = 1. This should work with
the document as in:

Mr|Joe|Bloggs
Mr|Fred|Smith

Hope this helps,
Gary


"StevenCampbell" wrote:

Hello and thanks for your assistance.

I have a sample flat file definition, (provided below), then i have a
custom send port that outputs the file contents in "|" delimited
fashion.

- When I output the flat-file schema just using PassThruTransmit, the
expected 2 lines of data exist.

- When I output the flat-file schema using the custom send pipeline,
only the first line of the expected two lines of data exist.

Question, why would the custom send pipeline only output the first line
of data?

This is my first FlatFile attempt, I tried looking for 'delimited'
samples, but was only able to find 'positional' file samples, if you
know a link to a sample (preferably with images) please let me know.

(When you see the ouput (provided below), it looks like the outPut when
just transmitting it out using 'PassThruTransmit', it appears as though
thier exists in the document two root elements, i think that this may
be the problem, if infact, question: how would i see up the flat file
to work as i need?)

Thanks,
--Steven

=============================================

[u]Expected File OutPut[/u]

firstName_1|lastName_1|city_1
firstName_2|lastName_2|city_2

=============================================

[u]FlatFileSchema.xsd[/u]

<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003";
xmlns="http://Schemas.TestSchema";
targetNamespace="http://Schemas.TestSchema";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<xs:annotation>
<xs:appinfo>
<schemaEditorExtension:schemaInfo namespaceAlias="b"
extensionClass="Microsoft.BizTalk.FlatFileExtension.FlatFileExtension"
standardName="Flat File"
xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions";
/>
<b:schemaInfo standard="Flat File" codepage="65001"
default_pad_char=" " pad_char_type="char"
count_positions_by_byte="false" parser_optimization="speed"
lookahead_depth="3" suppress_empty_nodes="false"
generate_empty_nodes="true" allow_early_termination="false"
early_terminate_optional_fields="false"
allow_message_breakup_of_infix_root="false"
compile_parse_tables="false" root_reference="Root" />
</xs:appinfo>
</xs:annotation>
<xs:element name="Root">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="char"
child_delimiter="|" child_order="infix" sequence_number="1"
preserve_delimiter_for_empty_data="true"
suppress_trailing_delimiters="false" repeating_delimiter_type="char" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:annotation>
<xs:appinfo>
<groupInfo sequence_number="0"
xmlns="http://schemas.microsoft.com/BizTalk/2003"; />
</xs:appinfo>
</xs:annotation>
<xs:element name="firstName" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="lastName" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="2" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="city" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="3" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>


============================================

[u]Output when using PassThru Transmit[/u]

<ns0:Root
xmlns:ns0="http://Schemas.TestSchema";><firstName>firstName_1</firstName><lastName>lastName_1</lastName><city>City</city></ns0:Root><ns0:Root
xmlns:ns0="http://Schemas.TestSchema";><firstName>firstName_2</firstName><lastName>lastName_2</lastName><city>City</city></ns0:Root>

============================================

[u]Output when using Custom Send Pipeline[/u]

firstName_1|lastName_1|city_1

==============================================

Thanks Again.


.



Relevant Pages

  • Re: BizTalk 2004 Disassembling Result Sets
    ... Create document schema: ... Open Visual Studio and create a new BizTalk project named NorthWindSplit ... set to receive and for the root element enter EmpRoot. ... For the item select a receive pipeline and name it EmpSplitPipe.btp. ...
    (microsoft.public.biztalk.general)
  • RE: This Assembler cannot retrieve document specification by using
    ... #1 Use a custom receive pipeline and in the disassembler specify the schema ... the RootNode in your schema is unique throughout your BizTalk Group. ... This posting is provided "AS IS" with no warranties, and confers no rights. ...
    (microsoft.public.biztalk.server)
  • Re: storage of arbitrary attributes and their names
    ... Assume we have something called an Item with an ItemType and an Owner. ... If a customer wants to associate "arbitrary custom information" to an item, ... thought is to create a well-defined "standard" schema, ...
    (microsoft.public.sqlserver)
  • Re: Assign Schemas dynamically at receive pipelines
    ... I do completey agree with the idea of deploying and do realise its ... My custom component will then use this xsl. ... Having separate client assemblies, using assembly namespaces, using xml ... Having a schema dumped in directory, will have its own versioning issues. ...
    (microsoft.public.biztalk.general)
  • Re: File Adapter - schema matching?
    ... The pipeline is independent of the file adapter - any message received from ... against a schema in the BizTalk database of assemblies. ... In terms of a custom "Parser", you would develop a Validating pipeline ...
    (microsoft.public.biztalk.general)