Skip to content

Instantly share code, notes, and snippets.

@juri96
Created November 15, 2019 13:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juri96/5bdf45e4227da79c549fb7d070831d23 to your computer and use it in GitHub Desktop.
Save juri96/5bdf45e4227da79c549fb7d070831d23 to your computer and use it in GitHub Desktop.
typealias SpitedFileLine = List<String>
typealias FileLine = String
fun splitCsvLine(): MapElements<FileLine, SpitedFileLine> {
return MapElements.into(
TypeDescriptors.lists(
TypeDescriptor.of(String::class.java)
)
)
.via(ProcessFunction<FileLine, SpitedFileLine> {
it.split(",")
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment