Re: Does dataframe write append mode work with text format

2016-06-18 Thread Yash Sharma
Awesome!! will give it a try again. Thanks!! - Thanks, via mobile, excuse brevity. On Jun 19, 2016 11:32 AM, "Xiao Li" wrote: > Hi, Yash, > > It should work. > > val df = spark.range(1, 5) >.select('id + 1 as 'p1, 'id + 2 as 'p2, 'id + 3 as 'p3, 'id + 4 as 'p4, > 'id + 5 as 'p5, 'id as 'b

Re: Does dataframe write append mode work with text format

2016-06-18 Thread Xiao Li
Hi, Yash, It should work. val df = spark.range(1, 5) .select('id + 1 as 'p1, 'id + 2 as 'p2, 'id + 3 as 'p3, 'id + 4 as 'p4, 'id + 5 as 'p5, 'id as 'b) .selectExpr("p1", "p2", "p3", "p4", "p5", "CAST(b AS STRING) AS s").coalesce(1) df.write.partitionBy("p1", "p2", "p3", "p4", "p5").text(