Re: splitting DataStream throws error

2018-07-30 Thread vino yang
Answered Mich privately, copy here: *Hi Mich,* *The use of Split directly on the stream object is wrong. * *It is used to split the data in the stream object, not the format of the stream object data itself. In this scenario, if you want to parse the data, use the map function only after the

Re: splitting DataStream throws error

2018-07-30 Thread Mich Talebzadeh
Thanks So the assumption is that one cannot perform split on DataStream[String] directly? Dr Mich Talebzadeh LinkedIn * https://www.linkedin.com/profile/view?id=AAEWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw *

Re: splitting DataStream throws error

2018-07-30 Thread Chesnay Schepler
You define a flatMap function that takes a string, calls String#split on it and collects the array. On 30.07.2018 22:04, Mich Talebzadeh wrote: Hi, I have Kafka streaming feeds where a row looks like below where fields are separated by "," I can split them easily with split function

splitting DataStream throws error

2018-07-30 Thread Mich Talebzadeh
Hi, I have Kafka streaming feeds where a row looks like below where fields are separated by "," I can split them easily with split function scala> val oneline = "05521df6-4ccf-4b2f-b874-eb27d461b305,IBM,2018-07-30T19:51:50,190.48" oneline: String =