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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Need to create table and insert data dynamically based on column values available in other table

Dear Team,

 

I need to create table and insert record dynamically in my destination table based on data available in a particular column of source table. Could you please share your ideas on developing this kind of talend jobs.

Please find below image that show how the source and destination table looks. Thanks in advance

 

0683p000009M83V.jpg

Labels (1)
  • v7.x

1 Solution

Accepted Solutions
manodwhb
Champion II
Champion II

@KathikVenky , First you need to take the unique values of ID's and need to iterate with tFlowtoIterate and then read the file then you use filter and filter the value from tFlowtoIterate  value and populate dboutput with action of table like create and the table name you need to pass from tFlowtoIterate  value .

View solution in original post

2 Replies
manodwhb
Champion II
Champion II

@KathikVenky , First you need to take the unique values of ID's and need to iterate with tFlowtoIterate and then read the file then you use filter and filter the value from tFlowtoIterate  value and populate dboutput with action of table like create and the table name you need to pass from tFlowtoIterate  value .

Raghuram_Puram
Contributor III
Contributor III

Hi Karthik,

 

DBInput:

SELECT DISTINCT ID FROM sourceDatabase;

 

DBInput-->tFLowtoIterate:

For Each ID value, iterate the create table and insert actions in the next component.

 

DBInput-->tFLowtoIterate-->DBOutput

CREATE TABLE <<ID>>;

INSERT INTO <<ID_**>> SELECT P1,P2,P3,P4 FROM sourceDatabase WHERE ID=**;

 

Good Luck!