Four Stars

logic implemention

Hi Team,

 

May i know how to implement attached logic in talend.

 

Thanks

shridhar

 

  • Data Integration
1 ACCEPTED SOLUTION

Accepted Solutions
Six Stars

Re: logic implemention

You're right, that's what it's called (I was thinking of tHiveRow).

David
8 REPLIES
Six Stars

Re: logic implemention

I think you can use this directly with the tSQLRow component: it lets you execute arbitrary SQL. You just need to type the query into the component.

David
Employee

Re: logic implemention

Or put that logic in a stored procedure, and call the stored procedure from tSQLRow.  It is much cleaner.  Remember, if some logic can be done by the DB, then leverage the DB, for example ELT, Views and Stored Proc.  When you do ETL, you are adding overhead, because you are extracting the data from the DB, transfering it over the network, loading it into Java Memory, then processing/transforming, then transfer over network again and write to DB.  So all of these add to to the overhead.

Four Stars

Re: logic implemention

Hi David,

 

we are using open studio edition and  tSQLRow component is free edition or enterprise edition?

 

Main requirement  we are not interested PLSQL proc is database, everything code i want convert in to Talend.

 

Thanks

Shridhar

 

Four Stars

Re: logic implemention

Hi,

 

Yes i agree that performance issue occur when continues hit to database. The execution native driver much faster that different drive  if i am correct.

 

we are using open studio edition and  tSQLRow component is free edition or enterprise edition?

 

Main requirement  we are not interested PLSQL proc is database, everything code i want convert in to Talend.

 

Thanks

Shridhar

Six Stars

Re: logic implemention

tSQLRow is part of the free edition.

To convert your logic so that it runs with Talend components, you'll need a to query the database and feed the result set into some tMap components that will let you join records together and do other ETL work. Read up on how tMap works and see if you can translate some of the logic yourself: it is really the "go to" component in Talend for this kind of work. You might also look at the components under the ETL heading in the Palette to see if any of them would be useful.

David
Four Stars

Re: logic implemention

Hi David,

 

I have searched in the Palette , there are no component like tSQLRow. I am using Talend 6.3.0.20.

 

You mean to say tOracleRow component.

 

Thanks

Shridhar

Six Stars

Re: logic implemention

You're right, that's what it's called (I was thinking of tHiveRow).

David
Four Stars

Re: logic implemention

Hi David,

 

Thanks for inputs, i have last query.

 

What is best way to do below query in talend.

 

UPDATE table1  RTMC
SET FLAG = 'MATCHED'
WHERE EXISTS (SELECT 1
FROM table2 RTMF
WHERE RTMC.TRN_REF_NO = RTMF.REF_NO
AND RTMC.LAMT = RTMF.REAMOUNT);

 

If records contains in millions.

 

Thanks

Shridhar