Ask Your Question
1

Use current EPOCH time (in seconds) as a parameter in pipeline

asked 2019-04-15 09:41:26 -0500

srinath_222 gravatar image

updated 2019-04-15 09:41:47 -0500

Hi,

I need to extract the current EPOCH time (in seconds) and use it as a parameter in Streamsets pipeline and use it for pulling incremental data from a database origin.

I am trying to use the below expression to get epoch time but it is giving in milliseconds ${time:dateTimeToMilliseconds(time:now())}. Trying to use below but its not working: ${time:dateTimeToMilliseconds(time:now())/1000} but not working.

Please suggest how to extract current EPOCH time in seconds and how to use that in an expression in parameter

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-04-19 16:14:52 -0500

iamontheinet gravatar image

Hi!

This expression ${math:round(time:dateTimeToMilliseconds(time:now()) / 1000)} will give you Epoch in seconds.

Cheers, Dash

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-04-15 09:41:26 -0500

Seen: 16 times

Last updated: yesterday