I read data from cassandra in a scala spark program with com.datastax.spark.connector
like the follows:
val data = sc.cassandraTable("keyspace", "tablename").select("columnA", "columnB", ...)
The column names are defined in a Array[String]
as:
val columnArray: Array[String] = Array("columnA", "columnB", ...)
There are too many columns in columnArray
that I need to construct a parameter for select function with columnArray
.
How to construct a ColumnRef
type parameter for select with Array[String]
?