segmented CSV into table

Hi there,
i just started working with knime and love it.
XML was kind of easy and straight forward, but csv really paused my progress for the moment, can you please give me a hint how to go on?

i have csv files that segment the data in 3 segments:

000001.csv
1;Adress1;Adress2
2;Position1;InvoiceNb.XXX
2;Position2;InvoiceNb.XXY
2;Position3;InvoiceNb.XXZ
3;PaymentAdviceNumber887654321;Name_Vendor VVV
1;Adress13;Adress14
2;Position1;InvoiceNb.AAA
2;Position2;InvoiceNb.AAB
2;Position3;InvoiceNb.AAC
3;PaymentAdviceNumber12345678 ;Name_Vendor VVV

i would like to get a table that combines the Datasets to look like that:

PaymentAdviceNumber Name Vendor Adress1 Adress2 PositionNb PositionInvoiceNb
887654321 VVV 1 2 1 XXX
887654321 VVV 1 2 2 XXY
887654321 VVV 1 2 3 XXZ
12345678 VEV 13 14 1 AAA
12345678 VEV 13 14 2 AAB

all ideas appreciated, thank you!

Hello @besides and wellcome here !

I propose this workflow :
segmented_csv.knwf (28,9 Ko)

I assume that data are organized by position : a ‘bloc’ of information begin by Adress and an identifier can be defined. Then Joiner node can organized information by type (1,2,3).

Hope this can be useful !
Best,
Joel

4 Likes

Hi Joel,

thank you very much for the warm welcome!
The BLOC identifier was the thing i was not able how to crack, thank you very much for that and your workflow!
i will try to figure out how i can implement it in my real life scenario which differs a little from my example i made up for demonstration.
I have to grab a value from the 3rd segment as identifier and roll it from there, but i think i can solve it out from here!

Thanks a lot
Thomas

Hi @besides,
I am glad to hear it !
Let me know if I can help you again in your problem.

Best,
Joel