One Star

[resolved] How to read and fetch data from DataBase?

Hi,
I could not find any component in Talend ESB, which can read the database and also retrieve data from database. If any one find components then let me know about that component.
I want to execute an query like:- Select emp_name,emp_adress from emp_table where (select count(emp) from emp_table where emp_status='YES')=1. How do I implement this type of fetching in talend ESB. I have an JDBC connection repository. I have tried with tJDBCInput but could not find any way to get out from this problem. If I used tJDBCInput then what should be the schema?
Thanking you,
Regards,
Sanjay
1 ACCEPTED SOLUTION

Accepted Solutions
One Star

Re: [resolved] How to read and fetch data from DataBase?

Hi,
You can read and fetch database in Talend ESB using tJDBCInput and tFilterRow. It's very easy to deal with these components. Combine these two component you can run your count query.

Regards,
Sanjay
3 REPLIES
Employee

Re: [resolved] How to read and fetch data from DataBase?

Hi Sanjay,
You should be able to use cTalendJob from Mediation to hook up to a Job from the Integration perspective. The job you use will have to have a tRouteInput and tRouteOutput at the beginning and end of your data flow, respectively. You should be able to query your database using the DI database components and your schema there, in conjunction with a tMap or tXmlMap. Details on how to query databases from a tMap should be available from our tutorial or webinar video library - or also on YouTube.
I hope that helps.
-Ben
One Star

Re: [resolved] How to read and fetch data from DataBase?

Hi Ben,
Thanks a lot. I understand your concept. But this is a long process. That means Talend ESB does not have any component, which is able to read and fetch data.
By the way I have done this by writing database connection code in tJavaRow components. I am just thinking that if talend has a component then job will be look better.Thanks once again.
Regards,
Sanjay
One Star

Re: [resolved] How to read and fetch data from DataBase?

Hi,
You can read and fetch database in Talend ESB using tJDBCInput and tFilterRow. It's very easy to deal with these components. Combine these two component you can run your count query.

Regards,
Sanjay