Skip to Content
avatar image
Former Member

Splitting File

Let us say I am getting 1000 records in a flat file. Let us say I want to process only 500 records from that file and remaing I don't want to process. How do I do that without BPM.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    Apr 17, 2008 at 05:57 PM

    If you have a business rule then use it in mapping and produce the target strucuture with only those required records and pass it on to the target system.

    VJ

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 17, 2008 at 06:11 PM

    Hi !

    I suggest to use graphical mapping. There you usually map a father node in the source that has ocurrance 0/1...unbounded to another father node in the target that also has occurance "unbounded", to have one target element or complex element for each input element. You could insert a UDF in between and count using a global container and once you reach the required quantity of elements, you can stop throwing as output the incoming input.

    If you can determine which records you should process by their record type, you can instead use the File Content Conversion.

    Regards,

    Matias.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 17, 2008 at 06:12 PM

    Hi,

    In your mapping program, you can add additional XSLT / Java mapping program which only take first 500 records then pass result xml to your regular mapping program.

    This way your file adapter still pick up the file with 1000 records as usual file adapter does.

    Regards.

    Liang

    Edited by: Liang Ji on Apr 17, 2008 8:49 PM

    Add comment
    10|10000 characters needed characters exceeded