I am trying to pass a variable number of arguments to the select function
of a SchemaRDD I created, as I want to select the fields in run time:


val variable_argument_list = List('field1,'field2')

val schm1 = myschemaRDD.select('field1,'field2) // works
val schm2 = myschemaRDD.select(variable_argument_list:_*) // do not work


I am interested in selecting in run time the fields
from myschemaRDD variable. However, the usual way of passing variable
number of arguments as a List in Scala fails.

Is there a way of selecting a variable number of arguments in the select
function? If not, what will be a better approach for selecting the required
fields in run time?



Thanks in advance for your help
-- 
Cesar Flores

Reply via email to