Post a reply

Write your message and submit

Options

Click in the dark area of the image to send your post.

Go back

Topic review (newest first)

SMaz
2008-05-02 03:55:32

I don't think you need a tOracleRow - I believe you should replace it with the actual table you want to do a lookup in (via another tOracleInput).

Then, on your tMap component - just drag the COL21, COL22, COL23 over to the output.
Then use a tFilter after the tMap and check to see if col22 is null (which it will be if there was no match).

The nulls will be sent to the Main flow out of the tFilter and the Rejects (the recs where the row1.COL1 exists in row2 table) can be sent somewhere else.  Make sure to check the Inner Join box. 

This seems to have worked well for me in the past.  If I'm still unclear - let me know and I'll try to post an example for you.

itc_man
2008-04-22 18:37:59

Attached is the flow I want to accomplish.. anybody achived this?..Appreciate your help.


                                                                      |(Lookup..check for existence)....>SQL ("SELECT count(*) FROM "TABLE_TARGET" WHERE column = '" + rowN.column + "'")
                                                                      |
Source(TABLE_SOURCE) -----(rowN)-->tMap--(Insert Flow)-------> Traget("TABLE_TARGET")
                                                                       \
                                                                         \
                                                                           \---(Update Flow)----> Traget("TABLE_TARGET")

itc_man
2008-04-19 05:56:32

I believe you missed the point. I want to make sure as the rows are pass from input to transformation to output (with the commit rows = 1)...any subsequent rows coming in for processing, I would like to check for existence, processing, etc,

This a fundamental req. for a ETL tool......I have used many ETL tools like DataStage, Informatica OWB, DB2 Warehouse Edition, Data Integrator (BODI) and MSFT Integration Services and all of this fundamental feature.

Volker Brehm
2008-04-18 23:55:11

To go back to your original problem I would say that you could use the following solution (as example):

Read your data as is in the main flow, read the following data as lookup:
SELECT keyToMatchMainFlow, count(*) FROM table GROUP BY keyToMatchMainFlow;

Than you use a lookup in tMap with the selected key. You have than a number of rows for your data and could set a filter. Additional you can reject main rows without any lookup data (=> no data in your table for this key). If you only need the information if there is any data you can use, instead of count(*),  only the key.

Bye
Volker

itc_man
2008-04-18 14:17:33

Hi, Volker

I reviewed the posting, He is using the file insteads of databases. I have seen the example of using files and it works.

In the above example I have replicated what you said

- Check with a lookup in a tMap if the value exisits.
- Execute a predefined SQL (like "SELECT count(*) FROM table WHERE column = '" + rowN.column + "'") with a t[DB]Row

it seems to be simple example. but unable to do so in talend...any Ideas.... All I want do is to execute

SELECT count(*) FROM table WHERE column = '" + rowN.column + "'"  as the rows are passed from DBInputs

Volker Brehm
2008-04-18 01:06:40

About your compile problem:
You are using row1 in tOracleRow_1. This doesn't work.
For more info take a look at (same problem / lookup loaded outside the iteration, flow):
http://www.talendforge.org/forum/viewtopic.php?id=2676

itc_man
2008-04-18 00:28:59

anybody worked with t[DB]Row?.

I want like to know if anybody has worked on how to defer the hashing of lookups and lookup when input rows are passed into tMap or transformation?

itc_man
2008-04-17 14:27:48

Thx for your help Attached are the pics

shong
2008-04-17 04:56:26

Hello itc_man

I get some java error

Please show more information about your job and what's the error information?smile

Best regards

         shong

itc_man
2008-04-17 04:19:44

I get some java error

Volker Brehm
2008-04-16 21:33:10

Hi,

some ideas:
- Check with a lookup in a tMap if the value exisits.
- Execute a predefined SQL (like "SELECT count(*) FROM table WHERE column = '" + rowN.column + "'") with a t[DB]Row

If this wouldn't help you please give some more  information.

Bye
Volker

johnvkumar
2008-04-16 14:11:46

Thx a bunch.. it worked.. I now need to check if the rejected records already exists in the table using a different column to match on...Appreciate your help

Volker Brehm
2008-04-15 21:28:21

You can use tFilterRow. You get two outputs of the component (matched and rejected). One for for your tMSSQLOuput1 and one for your tMSSQLOutput2.

Bye
Volker

johnvkumar
2008-04-15 15:03:06

Dear Experts,

I would like have two outputs say tMSSQLOutput1 and tMSSQLOutput2
and One tMSSQLInput with a tmap and I would like send all the records that to tMSSQLOutput1 based on a condition( say America region) for update only and send all the rest  of the records  tMSSQLOutput2.

Thx

Board footer

Powered by FluxBB