Reading CSV file from an URL
Nikhdy opened this issue · 1 comments
Nikhdy commented
I know this question is better suited for StackOverflow, but could not find anything as specific there.
Can we read a csv directly from an url ? Something like
CSVReader.open(new URL(http://website.com/sample.csv).getFile()).allWithHeaders()
This throws an java.io.FileNotFoundException: /sample.csv (No such file or directory)
exception.
ThijsBroersen commented
use CSVReader.open(scala.io.Source.fromURL("http://website.com/sample.csv"))