"Commit every..." doesn't give you the opportunity to rollback your work.
On the other side, the changes made to the data are available in the database before all the records are processed and before the final commit.
tOracleCommit let you decide when to commit your work (or maybe rollback it using tOracleRollback component).
@prasan - It doesn't look informative if you are providing all your posts with same name "Scenario based Question in Talend???". Could you please add the subject line with details of the query you are planning to ask so that it will generate interest among Talend community members. It will also help you when you are searching the topic at alter point of time :-)
I completely agree with @TRF. Coming to your query, imagine you have 3 tables table1, table2 and table3. You have to either insert data in all 3 tables or rollback from all three tables if some error happens anywhere. If you use tOracleCommit and tOracleRollback, you can do it easily by committing or rollbacking according to your business requirement.
If you are doing commit at individual tables, you will lose the rollback opportunity of 3 tables.
Ideally you should create a new topic for a new query so that each topic in community will remain relevant to the first query asked. Some etiquette while using community is to acknowledge other community members' reply by giving Kudos and marking the right reply as answer to the topic once the query is answered since they are trying to help you and Talend community in between their daily tasks.
I hope you have posted new query in same old post without this knowledge. So no worries and you can follow it in your future posts :-)
Coming to your query, you can do it using below code snippet as shown.
You need to add the condition in the expression section of tmap as shown below.
TalendDate.compareDate(row1.start_date,context.input_date)<=0 && TalendDate.compareDate(context.input_date,row1.end_date)<=0
The reference date which you want to check has been added as the context variable (context.input_date).
Hope I have answered your query. Could you please mark the topic as resolved since both queries in this topic has been answered. Kudos are also welcome :-)