Scala match error fix in datasource