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

Oracle Multiple Select Statements execution using Table/File into a Standard Output format

Hi All,

 

Requirement:

 I have Oracle configured Table with "Select Statements" as data.

First "select statement" to be executed and produce a result into an Oracle Table/File and then 

Second "select statement" to be executed and produce a result and then third ..... until end of all "Select Statements" execution is completed.

 

Note: 

1. All Select Statements having same output format to be loaded into a Oracle Table/File

2. Database schema is same for Oracle Configured Tables and Execution of Select Statements

 

Please provide detailed explanation along with examples

 

Thanks & Regards

Sreeramkumar

 

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi,

 

   Could you please verify the flow shown below?

0683p000009M54U.png

 

0683p000009M54Z.png

0683p000009M553.png

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

10 Replies
nfz11
Creator III
Creator III

You need to connect two tDBInputs and then one tDBOutput.  The first tDBInput reads the SQL statements from your table.  The second tDBInput executes each statement and then the tDBOutput stores the results from the second tDBinput.

Anonymous
Not applicable
Author

Hi @nfz11 

 How Second DBInput reads the SQL ? Can you send me Talend Job/Screenshot of each component with configuration? 

 

Thanks

Sreeram

Anonymous
Not applicable
Author

Hi,

 

   Could you please verify the flow shown below?

0683p000009M54U.png

 

0683p000009M54Z.png

0683p000009M553.png

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

Anonymous
Not applicable
Author

Hi @nthampi 

First of all thank you for detailed explanation 
Please send screenshot of TFlowtoIterate because it's throwing following error while executing the job at "tDBInput2" with error message 'ORA-00904: "RULE_QUERY": invalid identifier'

 

Thanks 

Sreeram

Anonymous
Not applicable
Author

HI @nthampi 

 

Tried above approach with sample data still getting errors 

 

Please find  complete flow in below two posts screenshots are attached here : 

 

Input table: 

Attachment: T_DYNAMIC_SELECT_IN_data.jpg

 

Talend Code: 

Attachment : 

Talend_Job_1.jpg

Talend_Job_2.jpg

Talend_Job_3.jpg

Talend_Job_4.jpg

 

Conitunation....... below post


T_DYNAMIC_SELECT_IN_data.jpg
Talend_Job_1.jpg
Talend_Job_2.jpg
Talend_Job_3.jpg
Talend_Job_4.jpg
Anonymous
Not applicable
Author

Talend Code: 
Conitunation....... above post

Talend_Job_5.jpg


Execution Error: 

Execution_Error.jpg

 

Thanks 

Sreeram


Execution_Error.jpg
Talend_Job_5.jpg
Anonymous
Not applicable
Author

@rchinta 

 

It is throwing an Oracle error saying invalid identifier. So could you please run only the first part of the job and deactivate the part from tDBInput3? Please try to print the results using a tJava to see whether the data is coming properly out of tFlowtoIterate.

 

Please also verify whether you are connecting to the right database. If there are multiple databases, often we add wrong DB credentials (it has happened to me couple of times in the past 🙂 )

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

 

 

Anonymous
Not applicable
Author

Hi @nthampi 

 

Please find the screenshots output after adding tJava Component

If possible please send any working solution for this scenario with sample data.

 

Thanks 

Sreeram


tFlowToIterate_Error_28May2019.jpg
tJava_28May2019.jpg
tJava_Output_Error_28May2019.jpg
Anonymous
Not applicable
Author

Hi Sreeram,

 

    Could you please print and see the results using below command in tJava and see whether results are coming?

System.out.println(<your tFlowtoIterate variable here>); 

 

Warm Regards,

 

Nikhil Thampi