Filtering set of values from the bigger dataframe
import spark.implicits._
val localFileDF = spark.read.orc("/tmp/Analysis-10")
localFileDF.filter(localFileDF("key") === "1065551413044" )
var followinglist=List("1065551413044")
val df2 = localFileDF.filter(col("key").isin(followinglist:_*))
import spark.implicits._
val localFileDF = spark.read.orc("/tmp/Analysis-10")
localFileDF.filter(localFileDF("key") === "1065551413044" )
var followinglist=List("1065551413044")
val df2 = localFileDF.filter(col("key").isin(followinglist:_*))
No comments:
Post a Comment