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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Read File, run the query in database, save the result back to a file

Hi
Here I am explaining my situation. Need to do a mapping
Step 1. File Input (Excel)
SNO;Query;
1;select count(*) as result from demo where rownum <10;
2;select count(*) as result from demo where rownum <20;
Step 2. Run Query in Database (Oracle 9i)
Step 3: Save the count back to another file (Excel)
SNO;Count
1;9
2;19
I am using tOracleRow to execute the query. However nothing productive yet.
Please give me suggestion to deal this situation.
Thanks in advance.
-
sangi
Labels (2)
5 Replies
Anonymous
Not applicable
Author

Hi sangi,
use a tOracleInput to get the data. You job should look like the following:
tFileInputExcel --(row)--> tFlowToIterate --(iterate)--> tOracleInput --(row)--> tIterateToFlow --(row)--> tFileOutputExcel
In tFlowToIterate you store your data in the global map. You could use the information from the global map to create your query.
In tIterateToFlow you store your result and the data of the global map back in the row.
To access the global map use: ((String)globalMap.get("rowX.name"))
Bye
Volker
Anonymous
Not applicable
Author

Hi Volker,
Thanks for the suggestion. I will try and let you know the result.
-
sangi
Anonymous
Not applicable
Author

In this flow
tFileInputExcel --(row)--> tFlowToIterate --(iterate)--> tOracleInput --(row)--> tIterateToFlow --(row)--> tFileOutputExcel
I am unable to do the following
tOracleInput --(row)--> tIterateToFlow
tOracleInput is allowing me to connect to tIterateToFlow (with Main)
Please advice me.
Thanks
-
sangi
Anonymous
Not applicable
Author

Hi sangi,
sorry you are right. It is not possible to connect them directly. Attached you find some screen shots. Looks scary but works...
Input
1, SELECT count(*) AS result FROM rel_release;
2, SELECT count(*) AS result FROM sys_system;

Output
1
SELECT count(*) AS result FROM rel_release;
1362
--------------------------------------------------
2
SELECT count(*) AS result FROM sys_system;
117
--------------------------------------------------

Bye
Volker
Anonymous
Not applicable
Author

Thanks a lot Volker, Its working!!! 0683p000009MACn.png