Create output files based on an input file and a control file

Hi,

I have a problem to create files based on a data input file and a control file. I’m not sure if EDT can do it.

The input (details) file has a structure like:

image

The control file has a structure:

Control

As a result I would like to get 3 files:

Any idea would be appreciated.

Thanks,
Olaf

I don’t understand how the output relates to the inputs.

Looked at it a bit more. I think I understand (assuming the B row in output in sequence 1 is a mistake).

I believe this (simplified version) does what you want:

olaf.transform (6.2 KB)

There may be more elegant ways to do the same thing. For example outputting 1 dataset to multiple files:

The output includes lines (and all columns) with the structure value from the control file in the sequence given in the 3 sequence columns.

E.g. the control file says for Sequence 1 take structure A as first and Structure C second. and for each structure all Steps should be taken.

For Sequence 2 all structure should be used but in the order A, C, B
for sequence 3 the structures C and B should be used in the order C and then B.

I hope this explains it.

Hi,
yes it does it.
I have now to extend it, so that this works for a variable set of control columns. But I think with your idea I can go on.
Thanks,
Olaf

1 Like

Hi,

I just wanted to say some words how I made it more flexible for changing number of sequences in the control file.

I created with the “split into multiple file” functionality one file per sequence.

Then I build the join part of the individual created control files. This part I run in command line mode with a loop for each created control file. I this I use the multiple-file output functionality to name the export file using part of the name of the input control file (meta data).

I real like the batch and the command line functionalities.

I used the command line loop here, as I run both transformations in one script. In EDT you can do the same with batch mode, using a wildcard for the control file input.

1 Like

A command line interface can be very useful.