Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Create a complex flat file schema using the flat file schema wizard
- This topic has 8 replies, 1 voice, and was last updated 4 years, 2 months ago by biztalkgurus.
-
AuthorPosts
-
-
July 26, 2010 at 9:43 AM #25373
How do you create a complex schema in which child
elements can have children of their own using the flat file schema
wizard?For example, I have this flat file:
HEADER|VALUEA|VALUEB
DETAIL|VALUE1|VALUE2
SUBDETAIL|SUBVALUE1|SUBVALUE2
DETAIL|VALUE1|VALUE2
SUBDETAIL|SUBVALUE1|SUBVALUE2
DETAIL|VALUE1|VALUE2
SUBDETAIL|SUBVALUE1|SUBVALUE2Notice that the DETAIL records are children of the HEADER and that
SUBDETAIL records are children of the DETAIL.The resulting xml should be something like this:
<Header PropA="ValueA" PropB="PropB">
<Details>
<Detail Key1="Value1" Key2="Value2">
<SubDetail SubKey1="SubValue1" SubKey2="SubValue2" />
</Detail>
<Detail Key1="Value1" Key2="Value2">
<SubDetail SubKey1="SubValue1" SubKey2="SubValue2" />
</Detail>
<Detail Key1="Value1" Key2="Value2">
<SubDetail SubKey1="SubValue1" SubKey2="SubValue2" />
</Detail>
</Details>
</Header>Is this possible using the flat file schema wizard? I could not find
a way to do this.Thanks
-
July 26, 2010 at 1:16 PM #25377
Hi,
If you haven’t figured out by now, you should create a second schema that conforms to your output XML structure, and a map that transforms your flat file schema to that XML schema.
-
July 27, 2010 at 8:23 AM #25396
Hi dunawayc.
As Daniel said, first make a new Schema with the Flat File Wizard. Take care of the seperators you want to use.
Are you receiving a XML flat file or a txt based flat file?
Wolfgang
-
July 27, 2010 at 2:49 PM #25408
The file I am receiving is very similar to the raw flat file I show above. It has a HEADER line with a few fields, then there are one or more DETAIL lines that a children to the header. The DETAIL line does not contain any data which connects it to the HEADER. A DETAIL line may have a further child, SUBDETAIL. When the message is stored in the message box, the resulting xml needs to preserve the parent child relationship.
-
July 28, 2010 at 9:20 AM #25425
Dunawayc,
se tag identifier for each record to create child nodes for a particular record.
– Jyothsna
-
July 29, 2010 at 9:28 AM #25438
I’m not sure what you mean. Every attempt I have made has, so far, been unable to validate the flat file instance.
-
July 29, 2010 at 6:14 PM #25445
Hi dunawayc,
I’ve created a sample for you, it’s in a zipped file that you can find when you click on my avatar on BizTalkGurus.com, go to the section “My Files” on the right-hand side, click on the link “View All Files”, look for the file named Sample_for_dunawayc.zip and download it to your desktop.
Here are the following 6 artifacts contained in the zipped file:
ComplexFF.txt (a Text file containing your flat file data used to validate the Flat File schema)
ComplexFFschema_output.xml (an XML file that represents your Flat file data in XML format, used as input for the map)
ComplexMapOutput.xml (an XML file that represents the output of the map when testing it)
ComplexFFschema.xsd (the Flat File schema conforming to your flat file data structure)
ComplexXMLschema.xsd (the XML schema representing the targeted XML structure that you want your data to end up in)
ComplexMap.btm (a BizTalk map using the Flat File schema as source, and the XML schema as destination)
I hope this approximates what you are looking for, and feel free to modify this sample. Btw, the schemas and map are constructed using BizTalk 2006 R2 so you can easily migrate them to version 2009, as you wish.
Best,
Daniel.
-
August 30, 2010 at 7:54 PM #25799
Hi
Can u please share the sample .I am having similar problem.
-
-
-
-
-
-
-
November 20, 2020 at 1:54 AM #50506biztalkgurus
The Dirty Girls Social Club by Alisa Valdés-Rodríguez : 9781250765864
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.