I have this entry "channels" in hocon format:
param {
channels = [
{
name = "MainPhone"
id = 1
}
{
name = "OpPhone"
id = 2
}
{
name = "Fax"
id = 3
}
]
}
What I need is to convert the entry channels
into a dataframe, is that possible? I was trying with the following code:
val ch = confParam.getConfigList("param.channels")
case class Provider(id: String, name: String)
val l = ch.map(conf => Provider(conf.getString("id"), conf.getString("name"))).toList
val df = l.toDF()
but I get the error:
"Error: (28, 20) value toDF is not a member of List [Provider] val df = list.toDF ()"