Can I have one workflow in informatica handle mappings for three different types of files based on the filename

StackOverflow https://stackoverflow.com/questions/17371102

Question

I have a directory of files where each file is in one of three file formats. We can use the filename to determine the file format for mapping data. I would like to loop through all the files in the directory and based on the filename direct it towards the associated session mapping, delete the file on success, update the control table and then move to the next file. I'd like the execution to be deterministic. What are some of my options?

Was it helpful?

Solution

As I understand it you dont want to have three workflows but want the same session to handle all files? It is difficult to get the workflow to run different sessions based on filenames. The easiest way is to let the mapping handle this. If you list your filenames in a textfile and instruct the session to load using indirect file and name the textfile as source the source qualifier can give you the name of the file currently being loaded. Then the mapping can treat the flow differently based on that filename. Note that all files listed in the textfile will be processed at the same time.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top