Skip to content

Commit

Permalink
Merge pull request #57 from YotpoLtd/hotfix_redshiftOutputWriter
Browse files Browse the repository at this point in the history
hotfix_redshiftOutputWriter
  • Loading branch information
RonBarabash authored Dec 5, 2017
2 parents 03a195d + 574910c commit e0141b0
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ class RedshiftOutputWriter(metricOutputOptions: mutable.Map[String, String], red

val log = LogManager.getLogger(this.getClass)
val props = metricOutputOptions("outputOptions").asInstanceOf[Map[String, String]]
val maxStringSize = props.getOrElse("maxStringSize", "")
val dbOptions = RedshiftOutputProperties(SaveMode.valueOf(props("saveMode")), props("dbTable"), props("extraCopyOptions"), props("postActions"), maxStringSize)
val dbOptions = RedshiftOutputProperties(SaveMode.valueOf(props("saveMode")),
props("dbTable"),
props.getOrElse("extraCopyOptions",""),
props.getOrElse("postActions",""),
props.getOrElse("maxStringSize",""))

override def write(dataFrame: DataFrame): Unit = {
redshiftDBConf match {
Expand Down

0 comments on commit e0141b0

Please sign in to comment.