You can fill in var-args with SomeColumns(myColumns:_*) style syntax. See for example: https://stackoverflow.com/questions/1832061/scala-pass-seq-to-var-args-functions
On Fri, Mar 30, 2018 at 6:15 PM Guillermo Ortiz <konstt2...@gmail.com> wrote: > > The poblem is that I have a method from Spark to insert into Cassandra: > childrenToInsertToParent.saveToCassandra("keyspace", "table", > SomeColumns("a","b","c","d")) > > I have to put an sequence of String to say what columns I want to save. I > would like to do it dinamically, to do that I have to save these names in > an array, but it doesn't work with this paramter, any way to set an array > to this method or similar? > > My idea is to get the name of the attributes from my case classes and put > them directly, but I just can set the names in an array, list and so on. >