O'Reilly logo

Clojure Recipes by Julian Gamble

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

23. A CSV Reader

Sooner or later, in your day-to-day work you’ll need to read a comma-separated value (CSV) file and perform an operation on the result. To make it even more interesting, we’re going to do this exercise with four million rows.

In this recipe we’ll write a large CSV to a file, and then read it in Clojure in a way that bypasses the performance overhead of the Clojure reader.

Assumptions

In this chapter we assume the following:

Image You have 300 MB of disk space spare.

Image You’re OK with waiting 4 minutes for a process to finish.

Benefits ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required