Hi,
I would try something like (untested):
(map parse-csv
(line-seq (clojure.java.io/reader "/tmp/foo.csv")))
But it will break for CSV cells with newlines like:
a ; b
foo;"bar
baz"
x ; z
interesting ...
Denis
On Sun, Jul 8, 2012 at 6:34 PM, Timothy Washington <[email protected]>wrote:
> Hi there,
>
> I'm trying out the
> Clojure-csv<https://github.com/davidsantiago/clojure-csv>lib. But I run out
> of heap space when trying to parse a large CSV file. So
> this call should return a lazy sequence.
>
> (csv/parse-csv (io/reader "*125Mfile.csv*"))
>
>
>
> Instead, I get a "*java.lang.OutOfMemoryError: Java heap space*". Is
> there a way to get that lazy sequence before reading in the entire file? I
> can't see one, when looking at the
> code<https://github.com/davidsantiago/clojure-csv/blob/master/src/clojure_csv/core.clj#L197>
> .
>
>
> Thanks in advance
> Tim
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to [email protected]
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en