Four Stars

how to generate a cyclic sequence no in talend data integration

i have to load a file with header detail and footer record in to a single file but when we load the records separate sequence number should be created for header and detail record, how can we achieve this.

 

example source

BIA00000000051070UPAULINA
SVA00000000051070S000009003RESFee
SVA00000000051070S000009003RESSupply
MTA00000000051070S000009003M000004576EL
BIA00000000091687UJACKSON
SVA00000000091687S000001365RESFee
SVA00000000091687S000001365RESSupply
MTA00000000091687S000001365M000001772E

Here BI is header and sva is detail ,mat is footer records

Req: i need to generate two sequence no as  below as

 seaqno

    1        BIA00000000051070UPAULINA
    1 1     SVA00000000051070S000009003RESFee
    1 2     SVA00000000051070S000009003RESSupply
    1 3     MTA00000000051070S000009003M000004576EL
    2        BIA00000000091687UJACKSON
    2 1     SVA00000000091687S000001365RESFee
    2 2     SVA00000000091687S000001365RESSupply
    2 3     MTA00000000091687S000001365M000001772E

  • Data Integration