Using a file from a parameter variable
There are times when it may be necessary to load data from a file without knowing the exact name of the file prior to execution. To handle this unique situation, ODI provides a convenient method for developing an interface that references a data store with a variable resource name. All that is required at runtime is simply to pass a parameter containing the actual name of the file that needs to be processed.
This recipe will demonstrate how an interface can be developed initially using a known data store after which the resource name of that data store is replaced with an ODI variable. The interface can then be called from a package that accepts the true value or the resource (file) at runtime.
Getting ready
This recipe requires that the DEMO_TRG
data model has been previously reverse engineered. Since this demonstration will load two text files, WORK_HIST_011.txt
and WORK_HIST_012.txt
, into the TRG_WORK_HIST
table, be sure to place these files in the...