Page 1 of 1

Dynamic table loading

Posted: Wed Jan 18, 2012 2:40 am
by balu536
Hi,
I have a requirement where to load data coming from multiple sequential files to different target tables. The table that need to be loaded for a particular file will be available in a lookup table where we'll lookup on file name and get the table name that needs to be loaded. My query is how to load the respective target table after fetching the name from the lookup table.

Reagrds,
Balu

Posted: Wed Jan 18, 2012 3:03 am
by ray.wurlod
Do the lookup in a sequence and pass the table name to the job as a parameter.

Posted: Wed Jan 18, 2012 3:12 am
by balu536
Please explain me how to do this.

Thanks in Advance.

Posted: Wed Jan 18, 2012 8:02 am
by chulett
Do all of these target tables have identical metadata?

Posted: Wed Jan 18, 2012 2:55 pm
by ray.wurlod
The sequence has two jobs, one to read the table name based on the file name (presumably a sequence parameter) and load that into its user status area. The second job does the load, with the table name passed as a parameter value whose value is obtained from the $UserStatus activity variable of the first job.

Because it processes at most one row, the first job should be a server job.