daily pastebin goal
30%
SHARE
TWEET

Untitled

a guest Feb 14th, 2018 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. val df = sqlContext.phoenixTableAsDataFrame(
  2.   Metadata.tables(A.Test), Seq("ID", "date", "col1", "col2","col3"),
  3.   predicate = Some(""date" = " + date), zkUrl = Some(zkURL))
  4.    
  5. val df1 = df.groupBy($"ID", $"YEAR", $"MONTH", $"DAY").agg(
  6.   sum($"col1" + $"col2" + $"col3").alias("col4"))
RAW Paste Data
Top