bildwelt
E2E FORUM
E2E Bridge E2E Commerce

convert flatfile into array

E2E Forum Modeling & Development convert flatfile into array

This topic contains 4 replies, has 2 voices, and was last updated by  Be Entjes 2 weeks, 2 days ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #3138

    Be Entjes
    Participant

    hi,

    Is there an easy way to convert a flatfile into an array?
    I searched the documentation but can not find a solution.

    thx.

    #3139

    Alfred
    Moderator

    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>>.

    #3140

    Be Entjes
    Participant

    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.

    #3141

    Alfred
    Moderator

    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.

    #3142

    Be Entjes
    Participant

    Alfred, thanks. Problem solved, you got me on the right track.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.