A.join(B, Seq("id"), "left").orderBy("id").groupBy("id", "name").agg(concat_ws(" ", collect_list("text")) as "texts")
concat string into single column using agg
collect_list returns array<string> in that case,
so if you want to use it inside the udf definition, you should take as Seq[String}
'소프트웨어 개발 > Scala - Functional' 카테고리의 다른 글
count sum example using identity (0) | 2018.06.29 |
---|---|
flatmap example (0) | 2018.06.29 |
스파크 전치... (0) | 2018.06.20 |
Spark Dataframe UDF - Schema for type Any is not supported (0) | 2018.06.01 |
Custom parameter when using udf (0) | 2018.05.19 |