Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Flat File To XML Maps , V Frustrating , Help !!!!
- This topic has 6 replies, 1 voice, and was last updated 9 years, 3 months ago by
community-content.
-
AuthorPosts
-
-
March 12, 2007 at 10:17 PM #17944
I would of thought this was a simple scenario but I just can't get the map to validate or test successfully.
I have an input tab (i.e >) seperated file with a header record i.e
field1>field2>field3
aaa>bbb>ccc
ddd>eee>fff
ggg>hhh>iiiThere could be any nunber of records in the input file.
Output file is an existing biztalk map with the following records and elements
<?xml version="1.0" encoding="utf-16" ?>
– <xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns="http://Schemas.PRODSTOK_XML" targetNamespace="http://Schemas.PRODSTOK_XML" xmlns:xs="http://www.w3.org/2001/XMLSchema"></xs:sequence></xs:complexType></xs:element></xs:schema>The other issue is that what ever I do in specifying the input file for testing the map, it always uses the one biztalk creates.Happy to provide more information, any help would be appreciated as I am really stuck 🙁Thanks -
March 13, 2007 at 7:04 AM #17951
Not enough information provided, nobody can help you. Sorry.
-
March 14, 2007 at 4:23 AM #17960
"The other issue is that what ever I do in specifying the input file for testing the map, it always uses the one biztalk creates."
You need to right-click the schema in Solution Explorer, select Properties and set the Input Instance Filename to the name of you test file. Also check that the Validate Input Instance Type is set to native and that the Generate Instance Output Type is set to Xml to see the Xml representation.
Nick
–
Nick Heppleston | http://www.modhul.com
-
March 14, 2007 at 4:45 AM #17963
Minor correction.
I dint understood frm where Validate Input Instance Type,Generate Instance Output type came in Map.
I suppose ur talking about.
Test Map input=Native
Test Map Output=XML
Test Map Input Instance=Your text file path[input file path].
-
March 14, 2007 at 7:08 AM #17966
These settings are on the schema – I have not provided details on how to resolve the mapping issue (my schema post is apparently under moderation!)
Nick.
-
March 15, 2007 at 10:29 PM #18010
Well Rastead.
Well your Schema and generated output dint matched when I copied your Schema.
How are the child elements Tab delimited.
I tried using positional things work fine…
I feel you can go ahead with positional if the Users are fine with it.
-
-
-
-
March 14, 2007 at 5:48 AM #17964
I've kind of work out part of this issue now although Im not sure if I'm going about it the right way !!
I created a pipelline with a flat file schema, I can now get the send and receive ports to convert the flat file into an xml document, only issue I have now is that the flat file consists of multiple records but I always end up with. Once I have XML the rest should be ease (I Hope 🙂 )
a) Only One Record
b) All the data from the end of the first record to the end of the file in the last field of the XML created.Input file is (Tab seperated Fields)
product_id stock_on_hand committed being_receipted in_transit on_order first_available_stock manufactured bundled last_updated
ACE0307 0 0 0 0 0 10 Days 07-12-2006 00:08:17
ACE0486 0 0 0 0 0 10 Days 07-12-2006 00:08:17
ACE0488 0 0 0 0 0 10 Days 07-12-2006 00:08:17
ACE9223 0 0 0 0 0 10 Days 07-12-2006 00:08:17
ACE9237 0 0 0 0 0 10 Days 07-12-2006 00:08:17This is what I end up with
<?xml version="1.0" encoding="utf-8" ?>
<f1>product_id</f1><f2>stock_on_hand</f2><f3>committed</f3><f4>being_receipted</f4><f5>in_transit</f5><f6>on_order</f6><f7>first_available_stock</f7><f8>manufactured</f8><f9>bundled</f9><f10>last_updated ACE0307 0 0 0 0 0 10 Days 07-12-2006 00:08:17 ACE0486 0 0 0 0 0 10 Days 07-12-2006 00:08:17 ACE0488 0 0 0 0 0 10 Days 07-12-2006 00:08:17 ACE9223 0 0 0 0 0 10 Days 07-12-2006 00:08:17 ACE9237 0 0 0 0 0 10 Days 07-12-2006 00:08:17</f10></Record></Root>Schema is as follows:<?xml version="1.0" encoding="utf-16" ?>– <xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns="http://Schemas_NB.NB_IM_PRODSTOK_V2" targetNamespace="http://Schemas_NB.NB_IM_PRODSTOK_V2" xmlns:xs="http://www.w3.org/2001/XMLSchema"><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" 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><b:recordInfo structure="delimited" child_delimiter_type="hex" child_delimiter="0xD 0xA" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" sequence_number="1" /></xs:appinfo></xs:annotation><b:recordInfo sequence_number="1" structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" child_delimiter_type="hex" child_order="infix" child_delimiter="0x09" repeating_delimiter_type="hex" repeating_delimiter="0x0D 0x0A" /></xs:appinfo></xs:annotation></xs:complexType></xs:element></xs:sequence></xs:complexType></xs:element></xs:schema>I'm guessing I have a postfix or infix mixed up somewhere but I have tried changing these values with no resultAny help would be appreciated as I am totally stuck !!
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.