-1

I've joined some DStream's together, so that the current "datatype" of the DStream looks like this ( key and values):

DStream[(Long,((DateTime,Int),((Int,Double),Double)))]

But i want to get:

DStream[(Long,DateTime,Int,Int,Double,Double)]

or

DStream[(Long,(DateTime,Int,Int,Double,Double)]

is there any function which i could apply on my DStream to transform it or how could i do this?

Thanks in advance!

1 Answers1

1

You probably looking for map function:

stream.map {case (lng, ((dt, i1),((i2, d1),d2))) => (lng,dt,i1,i2,d1,d2)}

or

stream.map {case (lng, ((dt, i1),((i2, d1),d2))) => (lng,(dt,i1,i2,d1,d2))} 
Nyavro
  • 8,806
  • 2
  • 26
  • 33