Four Stars

to get 15 min time interval data from database

hello, I have to add (timestamp '2018-01-16 16:30:00' and timestamp '2018-01-16 16:30:00' + interval '15' MINUTE) this condition in talend job, how to add this time interval in talend

10 REPLIES
Fifteen Stars

Re: to get 15 min time interval data from database

I'm assuming you mean that you need to load the current system time and the system time plus 15 minutes using Talend.

 

Try this code in a tJava and see if it does what you want. If not, can you elaborate on your requirement a little?

Date now = routines.TalendDate.getCurrentDate();
System.out.println(now);
Date nowPlus15 = routines.TalendDate.addDate(now, 15, "mm");
System.out.println(nowPlus15);
Rilhia Solutions
Four Stars

Re: to get 15 min time interval data from database

I want every 15 min data only from oracle database means input table is
Oracle database and I want every 15 min interval data into csv file. How
can I create job suggest me.
Fifteen Stars

Re: to get 15 min time interval data from database

Write a job to get the data you want and set it to append 1 row to your CSV file for each run. Then schedule the job to run every 15 minutes (using crontab, a windows scheduler or Talend Administration Center if you have the Enterprise Edition).

 

If you want a Job to run continuously to do this, that is a bad idea with the ETL product. You could use the ESB product and have a Route running with a timer set to run every 15 mins. Then connect a cTalendJob component to the Timer to carry out the work I suggested in the paragraph above.

Rilhia Solutions
Four Stars

Re: to get 15 min time interval data from database

Okay... Is there any option in talend open source not Enterprise edition
Fifteen Stars

Re: to get 15 min time interval data from database

No. Not for scheduling. But I gave you some alternatives you could try. The ESB route may be tricky to get your head round, but it may open up a plethora of opportunities to you when you get to grips with it. Alternatively, use the crontab to do it (or a Windows scheduler).

Rilhia Solutions
Four Stars

Re: to get 15 min time interval data from database

What is the code to add time interval in tjava and how it works to get every 15 min data from oracle input table into csv file.. can u explain the job
Four Stars

Re: to get 15 min time interval data from database

Hi,

I am trying to schedule a daily job for every 15 Minutes of time interval need to run. Could you please suggest me to configure a trigger every 15 Minute need to run ?

Please Help me.

Thank you,

Tags (1)
Fifteen Stars

Re: to get 15 min time interval data from database

For Windows you could try using the Task Scheduler (https://www.digitalcitizen.life/how-create-task-basic-task-wizard). For Linux you might try the crontab (https://tecadmin.net/crontab-in-linux-with-20-examples-of-cron-schedule/).

Rilhia Solutions
Four Stars

Re: to get 15 min time interval data from database

I want every 15 min of systime data... what is the java code for this job???

Four Stars

Re: to get 15 min time interval data from database

Hello , your tjava code gives the output of 15 min time interval but could u please suggest me how can I get data from toracleinput using tjava, could u please explain the job??