Select query with 'IN' operator implemention with tmap in talend open studio

Four Stars

Select query with 'IN' operator implemention with tmap in talend open studio

Hi,

I have query example

(SELECT column_name(s)
FROM table_name
WHERE column_name IN (value 1, value 2, ...);

 

How do i implement the above select statement with IN operator using 'tmap' in talend open studio.

Thanks in advance,

Rekha.

Six Stars

Re: Select query with 'IN' operator implemention with tmap in talend open studio

Hi ,

you can use tmap filter option with or clause to implement the in operator in talend

eg.

row2.colname ==10 || row2.colname== 20

Four Stars

Re: Select query with 'IN' operator implemention with tmap in talend open studio

Thank You Pankaj. I tried the solution, It works with value list.

If i want select value from another table. Is there any way to do this.

Ex: SELECT column_name(s)
FROM table_name
WHERE column_name IN (SELECT STATEMENT);

 

Thanks in advance.

Rekha

 

Nine Stars

Re: Select query with 'IN' operator implemention with tmap in talend open studio

In that case you would need lookup data flow into your tMap which would be the subquery part of your SELECT statement - and then join based on conditions in tMap.
Four Stars

Re: Select query with 'IN' operator implemention with tmap in talend open studio

Hi abhishek,

 

When you say "need lookup data flow into your tMap" 

Can you elaborate on this, How to perform this.

As i am new to Talend. Appreciate your help.

 

Thanks,

Rekha 

Six Stars

Re: Select query with 'IN' operator implemention with tmap in talend open studio

Hi ,

Whatever query you are using in the IN clause put it in another tDBInput component and join this to tables using tamp and then do the inner join on the column which you are using in the query WHERE Clause 


@RekhaB wrote:

Hi abhishek,

 

When you say "need lookup data flow into your tMap" 

Can you elaborate on this, How to perform this.

As i am new to Talend. Appreciate your help.

 

Thanks,

Rekha 


 

Calling Talend Open Studio Users

The first 100 community members completing the Open Studio survey win a $10 gift voucher.

Start the survey

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

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Download