Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Need help on How to Not assemble useless incoming data
- This topic has 5 replies, 1 voice, and was last updated 8 years, 10 months ago by
community-content.
-
AuthorPosts
-
-
January 23, 2006 at 6:05 PM #12709
Hi,
I have an incoming flat file I am assembling to XML. The problem is it contains useless data that I do not want to disassemble.
The incoming file looks like this
[quote:0b3ad8c450]1100705
1100705SAG01-0001 PHTCPY 3333
1100705SAG01-0002 PHTCPY 4444
1100705SAG01-0006 PHTCPY 8888
1100705SAG01-0006 PHTCPY 9999
1100706
1100706SAG01-0005 XXXXXX 1111
1100706SAG01-0006 PHTCPY 2222
1100706SAG01-0006 PHTCPY 9999
1100708
1100708SAG01-0003 PHTCPY 5555[/quote:0b3ad8c450]
The full lines I want, the partial lines I don’t want.
I am assembling them just fine but the partial lines only partially fill the XML.
Any help is greatly appreciated.
Thanks
Scott
-
January 27, 2006 at 4:57 PM #12710
I am using a map but how can I tell the map to ignore the errant records?
-
February 1, 2006 at 7:19 PM #12711
That solution worked perfectly, just like magic.
I don’t understand how since I didn’t link any incoming fields to the script functoid.
Thank You
Scott
-
January 23, 2006 at 10:54 PM #12712
As far as I am aware the Flat File disassembler cannot ignore records.
Your options would be to write your own disassembler or deal with the errant records using a map-
January 27, 2006 at 6:55 PM #12713
You can create a map with the same input and output schema
Add a scripting functoid with Script Type = Inline Xslt and copy this code[code:1:5d60a03c92]<xsl:copy>
<xsl:for-each select=\"*\">
<xsl:if test=\"child::*[position()=2]/text()\">
<xsl:copy-of select=\".\"/>
</xsl:if>
</xsl:for-each>
</xsl:copy>[/code:1:5d60a03c92]Connect the scripting functoid output to the root node of the destination schema.
The assumption is that field 1 of each record is present and field 2 is missing from the records you wish to remove. If this is not the case you can change the position() value.
-
February 1, 2006 at 11:44 PM #12714
The Mapper is just a GUI developer tool for producing XSLT. It uses schema properties, links and functoids to generate XSLT. You can see this if you do a Validate Map and check the output files.
The inline XSLT functoid just dumps your XSLT into the compiled XSLT, Because you cannot pass parameters to inline XSLT there is no point in having an input link. The output link is required so the compiler knows where to place your XSLT in the output.
Greg
-
-
-
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.