Customer Portal

Reading in dynamically numbered column CSV

Comments 1

  • Avatar
    vacekm
    0
    Comment actions Permalink
    Hello,

    in your case you need to dynamically generate metadata. For this you need to create one graph which will generate the metadata and then another which will use them and perform whatever you like. Please take a look into this thread where I posted an example showing this: viewtopic.php?f=4&t=5484

    For you the important part is the component XMLWriter in the graph EndecaGenerateMeta. You can see there how to generate the *.fmt file.

    So to sum up:
    - create a metadata generating graph, in which you
    - extract all the test names from your CSV
    - clean the test names of all whitespaces, since the metadata fieldnames can't contain spaces and so on (you can see how to do this in the example as well)
    - use the XMLWriter to create the external metadata file
    - you may add a RunGraph component into the last phase, which will call the worker graph
    - create a graph that will use the generated metadata (worker graph)
    - in here you can read your data by UniversalDataReader using the generated metadata.

    This can be done for each test file. I'm not sure if you need to somehow mix the data from more files together. If so then you'd need different metadata for each file.

Please sign in to leave a comment.