Created
October 9, 2019 16:43
-
-
Save quagly/f901afa76fedc8fc1c098dda49da6d32 to your computer and use it in GitHub Desktop.
generate spark dataframe timeseries
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
val start_dttm = Timestamp.valueOf("2019-01-01 00:00:00") | |
val inlineDf = (1 to 4).map { i => ((new Timestamp(start_dttm.getTime() + 60000 * i) , i)) }.toDF("eventTime","eventValue") | |
display(inlineDf) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment