Getting [FFP.0012.0004] Found no valid records while convettoValues

Hi All,

I have created a FFSchema with recorddefinition as dummyHeader. The FF Definition has record parser as Delimited with Record characeter newline, field character ,
The flat file is
dummyHeader,1,2
dummyHeader,3,4

Now I have a repeat step under which I am doing the convertToValues. The first dummyheader record is parsing fine.
But when it comes for 2nd iteration, the converttoValyes service is failing with [FFP.0012.0004] Found no valid records error.
The 2nd record is not getting parsed, could anyone help me with this?

Thanks in advance,
Guru

hi Guru,

You have multiple records in flat file. What i didn’t understand is is your “repeat step”, IMO you do not need a repeat step to convert the flatfile to values. All you need is to set the Max Repeat preoperty for the record definition.

  1. define a record “dummyHeader” in the schema
  2. Set the “Max Repeat” property (developer->properties panel) for the record to Unlimited or any positive number you want.
  3. Generate the document from the schema
  4. Now use the “converToValues” it should give you multiple records in output

-regards
DC

Hi DC,

Thanks for the response.
Actually my requirement is to parse the dummyHeader record one after the another. i.e. parse one dummyHeader and then process it. And then parse the second dummyheader and process it.
For this, I have done few additional things apart from the 4 steps you have mentioned above.

  1. Include the converttoValues under a Repeat flow step/construct.
  2. Set the “iterate” input in Converttovalues to “true”.
  3. Also branch step on ffiterator output from convertToValues to check if data exists. If data does not exist, then exit from the Repeat flow.

Please advise on this.

Regards,
Guru

hi Guru,
What you have done looks perfect. I don’t see any reason for failure except if there is something wrong in the schema.

attached the sample code (similar to your requirements) that works fine. hope this helps!

-regards
DC
TestFF.zip (7.95 KB)

This issue is resolved now.
Instead of invoking convertToValues through a ‘transfomer’, I am directly invoking it now.

Thanks Deepan, for all your help.

good know your issue is resolved.

Because the “ffiterator” holds the next records, and if invoked as transformer within repeat/loop this will be lost after first iteration unless mapped to a pipeline variable.

-regards,
DC

you know what? i had mapped out the ‘ffiterator’ in pipeline when calling converToValues as a transformer. Still it was not working. :frowning:
I found some threads just now in the forum regarding ‘transformer’ v/s ‘invoke’. It seems that if there is a loop/repeat, then it is not advisable to use transformers.
The way a service can be used as a transformer or invoke is like calling by reference and calling by value respectively.

So I am pretty sure that transformer is not working for my requirement. I better use invoke.

Regards,
Guru