You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Raghavendra Pandey <ra...@gmail.com> on 2015/07/28 06:34:47 UTC

Create StructType column in data frame

Hello,

I would like to add a column of StructType to DataFrame.
What would be the best way to do it? Not sure if it is possible using
withColumn. A possible way is to convert the dataframe into a RDD[Row], add
the struct and then convert it back to dataframe. But that seems an
overkill.

Please note that I don't know the StructType beforehand and I am creating
it based on some configuration so using case classes is out of picture.

Thanks.