Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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.
Labels (2)
8 Replies
Anonymous
Not applicable
Author

Hi,
Would you please upload your screenshot into forum so that we can get your situation more precisely.
Best regards
Sabrina
Anonymous
Not applicable
Author

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)
0683p000009MBCP.jpg 0683p000009MBCU.jpg 0683p000009MBCZ.jpg 0683p000009MA3D.jpg 0683p000009MBCe.jpg 0683p000009MB1D.jpg
Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

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)
0683p000009MBCj.jpg 0683p000009MBCo.jpg 0683p000009MB9c.jpg 0683p000009MBCt.jpg 0683p000009MBAa.jpg 0683p000009MBBY.jpg
Anonymous
Not applicable
Author

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
0683p000009MB7a.png
Anonymous
Not applicable
Author

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.
Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

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