Scenario based Question in Talend???

Highlighted
Seven Stars

Scenario based Question in Talend???

What is the difference between using Commit Every in dboutput components and toraclecommit.
Which one is better to use.
Fifteen Stars TRF
Fifteen Stars

Re: Scenario based Question in Talend???

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


TRF
Seven Stars

Re: Scenario based Question in Talend???

Can you provide me some use case?
Employee

Re: Scenario based Question in Talend???

@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

Seven Stars

Re: Scenario based Question in Talend???

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.


Employee

Re: Scenario based Question in Talend???

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

 

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

Seven Stars

Re: Scenario based Question in Talend???

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.

Employee

Re: Scenario based Question in Talend???

@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

Seven Stars

Re: Scenario based Question in Talend???

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

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog