ezoic

Monday, April 10, 2017

Spark scala, change the data type of the RDD

code:

val aa=sc.parallelize(List(("Ale",12,2783,89277)))

val ak = aa.map ( {case(w,k,r,u)=>(w,k,r,u.toLong)})

print(ak.toDF.show())


Change the last integer's type to Long.

No comments:

Post a Comment

looking for a man

 I am a mid aged woman. I live in southern california.  I was born in 1980. I do not have any kid. no compliacted dating.  I am looking for ...