Tagged: flatfile array
Is there an easy way to convert a flatfile into an array?
I searched the documentation but can not find a solution.
I’m not sure I understand your question. Can you explain the structure of your flatfile?
If you use the parse action of the <<FlatFileAdapter>> you get a <<FlatFile>> object which has an array of <<FlatFileRecord>>.
I have a csv file with a headerrecord and some datarecords.
What i’m trying to esteblish is to store the data in a MSSQL database.
Therefore I read the file using the flatfile adapter and then used an iteration to map the corresponding fields and store the data in the database.
The iteration expension node expects an array as input, but I only have the flatfile with flatfile records.
if I connect the flatfile to the expension node, I get the following errors:
03.10.2018 11:20:44 The object flow ending in the input expansion node ‘claims’ does not result in an Array.
03.10.2018 11:20:44 Expansion nodes must have arrays as in- and outputs.
I hope this explains my issue.
The array is the 0..* association between <<FlatFile>> and your data records.
In the example Parsing Simple Flat Files the DVD_list.DVD_List_Record is the array.
Alfred, thanks. Problem solved, you got me on the right track.
You must be logged in to reply to this topic.