Submit your inspiring success story or innovative use case to the 2022 Dataiku Frontrunner Awards! ENTER YOUR SUBMISSION

Parsing Epoch Timestamps using Prepare recipe

Solved!
jvijayakumar2
Level 2
Level 2
Parsing Epoch Timestamps using Prepare recipe

I'm trying to achieve

 

 

mutate(DATE = as.POSIXct(TIMESTAMPS, origin = '1970-01-01', tz = 'UTC'))

 

 

 through prepare recipe and the Convert UNIX timestamp doesn't seem to give any data in the DATE column. Could someone help?

 

 

0 Kudos
1 Solution
AlexT
Dataiker
Dataiker

Hi @jvijayakumar2 ,

Can try to first add formulate step with:

  format("%.0f", my_column_name) then try to convert to timestamp again in your current recipe.

https://knowledge.dataiku.com/latest/kb/data-prep/prepare-recipe/How-to-remove-scientific-notation-i...

 

If that doesn't work you may want to save the column with something like : 

my_timestamp <- as.numeric(my_datetime) in your R recipe before the prepare recipe. 

 

 

View solution in original post

0 Kudos
2 Replies
AlexT
Dataiker
Dataiker

Hi @jvijayakumar2 ,

Can try to first add formulate step with:

  format("%.0f", my_column_name) then try to convert to timestamp again in your current recipe.

https://knowledge.dataiku.com/latest/kb/data-prep/prepare-recipe/How-to-remove-scientific-notation-i...

 

If that doesn't work you may want to save the column with something like : 

my_timestamp <- as.numeric(my_datetime) in your R recipe before the prepare recipe. 

 

 

0 Kudos
jvijayakumar2
Level 2
Level 2
Author

Thanks, @AlexT ! The formulate step before applying the Convert UNIX processor helped.