We need to import large amount of data(about 5 millions records) to the postgresql db under rails application.
Data will be provided in xml format with images inside it encoded with Base64.
Estimated size of the xml file is 40GB.
What xml parser can handle such amount of data in ruby?
Thanks.
You’ll want to use some kind of SAX parser. SAX parsers do not load everything to memory at once.
I don’t know about Ruby parsers but quick googling gave this blog post. You could start digging from there.
You could also try to split the XML file to smaller pieces to make it more manageable.