I am working with Oracle Data Integrator 12c and I have a number of txt files, which somebody copies into a folder "/import". ODI should notice this and call a Mapping for each file. Then each file should be saved in another folder "/export"
My mapping is working perfectly for one file. I specified this file in the model part. But how can I dynamically load each file and let the mapping also work with each file and then save it?
I hope it is clear what I want :)
Thanks in advance
I have completed a similar process to your need. It was not an exact need but steps may help you. My solution was a bit tricky, since a third party send files into a directory via FTP and there is no limitation for number of files or file name standard.
Since the job was in a former client I am not able to provide you whole step codes and screenshots but I may tell the outline. You will need an ODI package
ls >> filelist.txt
filelist.txt
into a table with a sequence number for each row.#MAX_ROW_NUM
which reads the maximum file number from table above.#MAX_ROW_NUM > 0
#FILE_NAME
variable from table where ROW_NUM = #MAX_ROW_NUM
#FILE_NAME
execute the interface (source datastore must be dynamic in model)#FILE_NAME
to /completed
directory.#MAX_ROW_NUMBER
from filelist table#MAX_ROW_NUMBER
by -1
Optional step, you can KO from step 4 to another OSCommand which deletes the filelist.txt
I hope, I could explain my process clearly, in case of further help do not hesitate to ask.