Skip to content

Instantly share code, notes, and snippets.

@wrobstory
Created May 12, 2015 19:24
Show Gist options
  • Save wrobstory/656ccd8ad08ebfd47c17 to your computer and use it in GitHub Desktop.
Save wrobstory/656ccd8ad08ebfd47c17 to your computer and use it in GitHub Desktop.
CSV read
val byteBlob = s3.get(s3config.bucket, s3config.file)
val lines = new String(byteBlob).split("\n")
lines.slice(1, lines.length).map(line => {
line.split(",") match {
case Array(col1, col2, col3) => {
doSomethingHere(col1, col2, col3)
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment