From f4d5ef372eb4470e2447776cbeac618d7e290fdd Mon Sep 17 00:00:00 2001 From: DuyHai DOAN Date: Sun, 19 Apr 2015 15:48:40 +0200 Subject: [PATCH] Add footnotes to the UsUnemployment case class and ingestion --- .../us/unemployment/demo/FromCSVCaseClassToCassandra.scala | 2 +- src/main/scala/us/unemployment/demo/FromCSVToCassandra.scala | 2 +- src/main/scala/us/unemployment/demo/UsUnemployment.scala | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/scala/us/unemployment/demo/FromCSVCaseClassToCassandra.scala b/src/main/scala/us/unemployment/demo/FromCSVCaseClassToCassandra.scala index 0189e5e..5bc6c8d 100644 --- a/src/main/scala/us/unemployment/demo/FromCSVCaseClassToCassandra.scala +++ b/src/main/scala/us/unemployment/demo/FromCSVCaseClassToCassandra.scala @@ -43,7 +43,7 @@ object FromCSVCaseClassToCassandra { UsUnemployment(lines(0).toInt, lines(1).toInt, lines(2).toInt, lines(3).toDouble, lines(4).toInt, lines(5).toDouble, lines(6).toInt, lines(7).toInt, - lines(8).toInt, lines(9).toDouble, lines(10).toInt) + lines(8).toInt, lines(9).toDouble, lines(10).toInt, "") } } diff --git a/src/main/scala/us/unemployment/demo/FromCSVToCassandra.scala b/src/main/scala/us/unemployment/demo/FromCSVToCassandra.scala index 9f49153..81dc0c2 100644 --- a/src/main/scala/us/unemployment/demo/FromCSVToCassandra.scala +++ b/src/main/scala/us/unemployment/demo/FromCSVToCassandra.scala @@ -62,7 +62,7 @@ object FromCSVToCassandra { (lines(0).toInt, lines(1).toInt, lines(2).toInt, lines(3).toDouble, lines(4).toInt, lines(5).toDouble, lines(6).toInt, lines(7).toInt, - lines(8).toInt, lines(9).toDouble, lines(10).toInt) + lines(8).toInt, lines(9).toDouble, lines(10).toInt, "") }} .saveToCassandra(KEYSPACE, TABLE, TABLE_COLUMNS) diff --git a/src/main/scala/us/unemployment/demo/UsUnemployment.scala b/src/main/scala/us/unemployment/demo/UsUnemployment.scala index 65595e0..15406d6 100644 --- a/src/main/scala/us/unemployment/demo/UsUnemployment.scala +++ b/src/main/scala/us/unemployment/demo/UsUnemployment.scala @@ -2,7 +2,7 @@ package us.unemployment.demo case class UsUnemployment(year: Int, civilNonInstitutionalCount: Int, civilLaborCount: Int, laborPopulationPercentage: Double, employedCount: Int, employedPercentage: Double, agriculturePartCount: Int, nonAgriculturePartCount: Int, UnemployedCount: Int, - unemployedPercentageToLabor: Double, notLaborCount: Int) { + unemployedPercentageToLabor: Double, notLaborCount: Int, footnotes: String = null) { - override def toString() = s"""Year($year), unemployment % : $unemployedPercentageToLabor""" + override def toString() = s"""Year($year), unemployment % : $unemployedPercentageToLabor, footnotes: $footnotes""" }