Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. .map(hotelState => {
  2. //sorry for junior code
  3. val row: String = hotelState.hotelStateKey.hotelId + CSV_DELIMITER + hotelState.hotelStateKey.withChildren +
  4. CSV_DELIMITER + hotelState.erroneousData + CSV_DELIMITER + hotelState.shortStay + CSV_DELIMITER +
  5. hotelState.standartStay + CSV_DELIMITER + hotelState.standartExtendedStay + CSV_DELIMITER +
  6. hotelState.longStay + CSV_DELIMITER + hotelState.resultingType
  7. })
  8. .withColumn("timestamp", when(col("value").isNotNull, ""))
  9. .writeStream
  10. .outputMode(OutputMode.Append())
  11. .format("console")
  12. .start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement