How to parse a file with more than million records in it?

65 views
Skip to first unread message

Vidushi Bassi

unread,
Sep 11, 2018, 9:20:57 AM9/11/18
to beanio-users
Hi,

I need to parse a file using beanIO where I have a group in the file format. The group can have more than 10000 records in it.
Please let me know how can I split the file and then parse it without getting outOfMemory exception or the InvlidRecordException.

Regards,
Vidushi Bassi

Steven Lequient

unread,
Sep 18, 2018, 10:26:16 AM9/18/18
to beanio-users
Hi... Sorry for your loss.
I've asked the same question a while back, and had no answer...
I found no apparent solution... so I improvised.

I've written my XML file with groups, so I could parse it with javax/jaxb, and extract a "template" of the XML.
I then made a copy of the file, in which I deleted the "group" tags, so BeanIO could parse line by line.
Since I had my hierarchical template, I then grouped everything manually for what I needed to do...

I hope it helps.
Good luck.
Reply all
Reply to author
Forward
0 new messages