spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prachicsa <prachi...@gmail.com>
Subject Filtering records for all values of an array in Spark
Date Wed, 09 Sep 2015 09:58:36 GMT


I am very new to Spark.

I have a very basic question. I have an array of values:

listofECtokens: Array[String] = Array(EC-17A5206955089011B,
EC-17A5206955089011A)

I want to filter an RDD for all of these token values. I tried the following
way:

val ECtokens = for (token <- listofECtokens) rddAll.filter(line =>
line.contains(token))

Output:

ECtokens: Unit = ()

I got an empty Unit even when there are records with these tokens. What am I
doing wrong?




--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/Filtering-records-for-all-values-of-an-array-in-Spark-tp24618.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org


Mime
View raw message