Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .map(hotelState => {
- //sorry for junior code
- val row: String = hotelState.hotelStateKey.hotelId + CSV_DELIMITER + hotelState.hotelStateKey.withChildren +
- CSV_DELIMITER + hotelState.erroneousData + CSV_DELIMITER + hotelState.shortStay + CSV_DELIMITER +
- hotelState.standartStay + CSV_DELIMITER + hotelState.standartExtendedStay + CSV_DELIMITER +
- hotelState.longStay + CSV_DELIMITER + hotelState.resultingType
- })
- .withColumn("timestamp", when(col("value").isNotNull, ""))
- .writeStream
- .outputMode(OutputMode.Append())
- .format("console")
- .start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement