Tags: udf* + scala*

0 bookmark(s) - Sort by: Date ↓ / Title /

  1. 2019-04-25 Tags: , , by klotz
  2. import org.apache.spark.sql.functions.{udf, explode}

    val zip = udf((xs: Seq Long » , ys: Seq Long » ) => xs.zip(ys))

    df.withColumn("vars", explode(zip_udf($"varA", $"varB"))).select(
    $"userId", $"someString",
    $"vars._1".alias("varA"), $"vars._2".alias("varB")).show
    2017-03-09 Tags: , , , by klotz
  3. 2014-03-26 Tags: , , , , by klotz

Top of the page

First / Previous / Next / Last / Page 1 of 0 SemanticScuttle - klotz.me: tagged with "udf+scala"

About - Propulsed by SemanticScuttle