Last active
April 18, 2017 21:02
-
-
Save marhan/d10f0fc80099c636586e7212fad0c813 to your computer and use it in GitHub Desktop.
Transform haspa spark data frame into computable formats (Zeppelin Paragraph)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%spark | |
val account = df.withColumn("Betrag", regexp_replace( regexp_replace( df("Betrag"), "\\.","" ) , "\\,",".").cast(DecimalType(10,2))) | |
.withColumn("Buchung", to_date( unix_timestamp( col("Buchung") , "dd.MM.yyyy" ).cast("timestamp") ) ) | |
.withColumn("Wert", to_date( unix_timestamp( col("Wert") , "dd.MM.yyyy" ).cast("timestamp") ) ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment