FlatFile schema parsing values

I would appreciate your help to solve this issue:
I have created a flat file schema, which has two records, Header and Data.
Header has one field EmpNume, where as Data has three fields.

I am facing difficulty to parse data in both records. I am attaching the pictures regarding my problem:


this is the schema.
Now I am going to attach the flow service i’m using to process this schema.

the pipeline for each step is:


this is the input i’m parsing, where 12345678 is the EmpNum under header Record…
after running the flow service i’m getting this error

I would like your help.

Unfortunately, you cannot use the number of fields to determine which type of record a specific line matches. This is, in part, due to the fact that “detail” record could have optional fields at the end – and in that case the count of fields will change and might match a different record type. So you must specify a field in each record that can unambiguously serve as a record type identifier.

In the case you shared, the file could be:

D, Irfan,3500,03214198008
D, Afzal,1200,03214133188
D, Asif,1400,03214143188

With field 1 defined as the record identifier, using ‘H’ for the header record type and ‘D’ for the detail record type. You can use any value desired. The identifier can be a specific field or can be at a specific character positiion.

If a record identifier is not used (often the case for single record type files) you specify a doc type as the default record type.

Refer to the service development help for details. HTH.

1 Like

thanks a lot Reamon
thats really informative and helpful

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.