M
Mathematisch
Hi,
The problem: I would like to create an iterator to iterate through a
csv file with the following structure:
field_1,field_2,...field_14
field_1,field_2,...field_14
(...)
Note that this is a csv file with 14 fields and it is already sorted
by field_1 and then by field_2. There are usually only 5-10 lines
having the same field_1 and field_2 value.
There could be up to hundreds of millions of lines in the file. The
desired iterator should work like this: At each "next_entry" call, the
iterator should return a reference to an array of the lines having the
identical field_1 and field_2 values.
Because of my lack of understanding the iterator concept, I could not
come up with a solution yet. The file is too big to use the field_1
and field_2 as a hash key to achieve the same goal of grouping the
entries.
Thank you very much for any help on this. I hope I can learn from the
eventual proposed solutions.
Kind regards.
F.
The problem: I would like to create an iterator to iterate through a
csv file with the following structure:
field_1,field_2,...field_14
field_1,field_2,...field_14
(...)
Note that this is a csv file with 14 fields and it is already sorted
by field_1 and then by field_2. There are usually only 5-10 lines
having the same field_1 and field_2 value.
There could be up to hundreds of millions of lines in the file. The
desired iterator should work like this: At each "next_entry" call, the
iterator should return a reference to an array of the lines having the
identical field_1 and field_2 values.
Because of my lack of understanding the iterator concept, I could not
come up with a solution yet. The file is too big to use the field_1
and field_2 as a hash key to achieve the same goal of grouping the
entries.
Thank you very much for any help on this. I hope I can learn from the
eventual proposed solutions.
Kind regards.
F.