diff --git a/src/main/scala/us/unemployment/demo/FromCassandraToSQL.scala b/src/main/scala/us/unemployment/demo/FromCassandraToSQL.scala index 437ce5c..31b00fe 100644 --- a/src/main/scala/us/unemployment/demo/FromCassandraToSQL.scala +++ b/src/main/scala/us/unemployment/demo/FromCassandraToSQL.scala @@ -26,7 +26,9 @@ object FromCassandraToSQL { println("\n ------------ Results ----------------- \n") - row.collect().foreach(row => println(s" Year(${row(0)}): ${row(1)}%")) + row.collect() + .sortBy(row => row.getInt(0)) + .foreach(row => println(s" Year(${row(0)}): ${row(1)}%")) sc.stop() }