Parsing Epoch Timestamps using Prepare recipe
jvijayakumar2
Partner, Dataiku DSS Core Designer, Dataiku DSS Adv Designer, Registered Posts: 30 Partner
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?
Best Answer
-
Alexandru Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1,226 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.
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.
Answers
-
jvijayakumar2 Partner, Dataiku DSS Core Designer, Dataiku DSS Adv Designer, Registered Posts: 30 Partner
Thanks, @AlexT
! The formulate step before applying the Convert UNIX processor helped.