I am trying to filter the Spark SQL DataFrame with where condition.
For example: [ working one]
df.where(col("pType").isin("type1","type2"))
What I am trying is, instead of hard coding the pType
values, I am trying to build it dynamically. So i build a List(String) with all the pType
values.
For example, if I have List("type1","type2")
, how can I use this list to isin
method?