having problem in iteration and retrieving values of table

One Star

having problem in iteration and retrieving values of table

I have created a job in which i am having problem in retrieval of values from table as i have no of tables in database so it surpasses all the tables and processes only last table in the database and hence leaves all the other tables without processing and performing any required operation on them.
Moderator

Re: having problem in iteration and retrieving values of table

Hi,
Would you please upload your screenshot into forum so that we can get your situation more precisely.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: having problem in iteration and retrieving values of table

i am not able to post the screenshots don't know why my post are not including images :-
but here is the way i used to create job :-
tMySQLInput->row(main) tJava->ON SUBJOB OK -> tMySQLConnection->ON SUBJOB OK ->tMySQLtablelist ->iterate -> tJava->ON Component Ok ->tMySQLInput ->row(main)tLOGROW

tMySQLInput-> Retriving database names from table to which dynamic connection will be made.
->row(main) tJava (rertriving database names from tables and inserting into context variable for connection)
->ON SUBJOB OK -> tMySQLConnection(using context variable for establishing connection with database)
->ON SUBJOB OK -> tMySQLtablelist(retrivieng table names from databases)
->iterate -> tJava(inserting table name in context variable for retriving values from table)
->ON Component Ok ->tMySQLInput (for Retriving values from tables iterated through and stored in context variable)
Moderator

Re: having problem in iteration and retrieving values of table

Hi,
You can post your image by "Image Upload' section(Limits: 20 images per post, each image must be less then 1024x768 pixels and 200 KB), which will be convenience for us to check.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: having problem in iteration and retrieving values of table

Hi,
You can post your image by "Image Upload' section(Limits: 20 images per post, each image must be less then 1024x768 pixels and 200 KB), which will be convenience for us to check.
Best regards
Sabrina

Hi Sabrina thanx for replying:- here are the screenshots of job created :-
here is the way i used to create job :-
tMySQLInput->row(main) tJava->ON SUBJOB OK -> tMySQLConnection->ON SUBJOB OK ->tMySQLtablelist ->iterate -> tJava->ON Component Ok ->tMySQLInput ->row(main)tLOGROW

tMySQLInput-> Retriving database names from table to which dynamic connection will be made.
->row(main) tJava (rertriving database names from tables and inserting into context variable for connection)
->ON SUBJOB OK -> tMySQLConnection(using context variable for establishing connection with database)
->ON SUBJOB OK -> tMySQLtablelist(retrivieng table names from databases)
->iterate -> tJava(inserting table name in context variable for retriving values from table)
->ON Component Ok ->tMySQLInput (for Retriving values from tables iterated through and stored in context variable)
Community Manager

Re: having problem in iteration and retrieving values of table

Hi
There is a job design problem in your job, it do not iterate each database, but only the last database, you need to use a tFlowToIterate after tMysqlInput(select databases) to iterate each database, see my screenshot.
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: having problem in iteration and retrieving values of table

Hi
There is a job design problem in your job, it do not iterate each database, but only the last database, you need to use a tFlowToIterate after tMysqlInput(select databases) to iterate each database, see my screenshot.
Shong

Thanx Shong for replying but when i use tFlowToIterate it doesn't allow me to add any other type of connection.
Community Manager

Re: having problem in iteration and retrieving values of table

Hi
There is a job design problem in your job, it do not iterate each database, but only the last database, you need to use a tFlowToIterate after tMysqlInput(select databases) to iterate each database, see my screenshot.
Shong

Thanx Shong for replying but when i use tFlowToIterate it doesn't allow me to add any other type of connection.
tFlowToIterate is used to iterate each row of the incoming data, it only has one connector 'iterate' out of this component, you can access each row of the incoming data on the next components with this way, for example:
(String)globalMap.get("row1.columnName") //for String type
(Integer/int)globalMap.get("row1.columnName") //for Integer/int type
(java.util.Date)globalMap.get("row1.columnName") //for Date type
...
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: having problem in iteration and retrieving values of table

Hi
There is a job design problem in your job, it do not iterate each database, but only the last database, you need to use a tFlowToIterate after tMysqlInput(select databases) to iterate each database, see my screenshot.
Shong

Thanx Shong for replying but when i use tFlowToIterate it doesn't allow me to add any other type of connection.
tFlowToIterate is used to iterate each row of the incoming data, it only has one connector 'iterate' out of this component, you can access each row of the incoming data on the next components with this way, for example:
(String)globalMap.get("row1.columnName") //for String type
(Integer/int)globalMap.get("row1.columnName") //for Integer/int type
(java.util.Date)globalMap.get("row1.columnName") //for Date type
...
Shong
Thankyou Shong for your Help it Worked , I need a bit more help.. As in the above screenshots i have retrived the databases to which the connection is made dynamically and content of tables have been retrived, But the issues is now i want to migrate these tables in each of the databases to another database with some Business Rules, Can you help me out in this as don't know the way to move forward as how to connect to target Database and then insert these values into those database..The Target Database is also MySQL