Multiple Record Types In Flat File Merged Into One Record In Desti

Multiple Record Types In Flat File Merged Into One Record In Desti

Post by VmluY2VudC » Fri, 15 Jun 2007 23:55:01


I'm looking for high-level information, not necessarily for technical details
(at least not yet, hopefully never) :)

I have a flat file that can contain multiple record types. These types are
not defined by a tag, they are defined by the first two characters of the
line.

Obviously, I need to bring that file in and have it transformed to an XML
representation. I've done this before using the flat file schema wizard on a
file that contains only one record type and that works fine for me.

I would assume that in this mixed record type case, the flat file schema
wizard still plays a role in this. I am thinking envelope schemas or
something in the custom pipeline but I simply do not know.

A direction please.
 
 
 

Multiple Record Types In Flat File Merged Into One Record In Desti

Post by Stefa » Sat, 16 Jun 2007 01:33:31

On 14 juin, 16:55, Vincent Melia


A direction on this would be to use either the Flat File Wizard as you
did, but then you need to modify the schema the question is how :

- if the schema generated by the Wizard gave you only one Root
Element node, and you are expecting this Root Element node to
duplicate then you are in trouble, and the best thing to do is to add
another Real Root Element
- Second: By default the max occurs property of the repeating is
empty (equivalent to 1) you need to put a star (*) on it (equivalent
to unbounded)

It's difficult to explain to you why it doesn't work because I don't
have an example file and what is the target you want to reach

Stefan
http://www.yqcomputer.com/

 
 
 

Multiple Record Types In Flat File Merged Into One Record In Desti

Post by Jan Eliase » Tue, 19 Jun 2007 05:34:23

On Thu, 14 Jun 2007 07:55:01 -0700, Vincent Melia


I will keep it as high-level as I can :-)

Actually, if a line is defined by some characters, then that IS a tag
identifier :-)


Do you need the file split up into sevelra files, one for each record
type? Or do you need to have the entire flat file transformed into one
big XML?

If you need it split up, then look into header, body and trailer
schemas for flat files.

If you need one big XML, then just use the flat file wizard. Define a
record for each record type there is.

If you need help, try posting an example file of what you need to
parse.

--
eliasen, representing himself and not the company he works for.

Private blog: http://www.yqcomputer.com/

Private email: XXXX@XXXXX.COM