Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Prasanna3
Contributor
Contributor

Scenario based Question in Talend???

What is the difference between using Commit Every in dboutput components and toraclecommit.
Which one is better to use.
Labels (2)
8 Replies
TRF
Champion II
Champion II

"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).

Prasanna3
Contributor
Contributor
Author

Can you provide me some use case?
Anonymous
Not applicable

@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.

 

Warm Regards,

 

Nikhil Thampi

Prasanna3
Contributor
Contributor
Author

Hi

I have data like this in table

empno,start time,endtime
1,2015-07-01,2015-12-31

and I have to check some xyz date if that falls between above start time
and endtime then I should get empno.

how can I achieve above scenario in Tmap.


Anonymous
Not applicable

@prasan

 

     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.

 

0683p000009M1Rp.png

 

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 🙂

 

Warm Regards,

 

Nikhil Thampi

Prasanna3
Contributor
Contributor
Author

Hi


I have data like this in table

empno,start time,endtime
1,2015-07-01,2015-12-31

and I have to check some context.start_date if that falls between above
start time and end time then I should get empno.this query I have to write
in dbcomponent and get the result.
Because this table I am using for lookup.

Anonymous
Not applicable

@prasan

 

    I hope the solution given above has helped you to resolve the query. 

  

    Could you please mark the topic as resolved so that it will help other Talend community members also? Kudos are also welcome 🙂

 

Warm Regards,

 

Nikhil Thampi

Prasanna3
Contributor
Contributor
Author

My query not resolved
I want to check that date range in lookup table when I checked in lookup table I am not getting data as expected.

I have two lookups and one main flow in my job, first lookup I will check xyz matched records, second lookup I have to check that date range based on that two lookups conditions need to get data when I do this I am not getting data as expected