Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
@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 .
@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 .
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!