Discussions
Categories
- 17.9K All Categories
- 3.4K Industry Applications
- 3.3K Intelligent Advisor
- 62 Insurance
- 536.1K On-Premises Infrastructure
- 138.2K Analytics Software
- 38.6K Application Development Software
- 5.7K Cloud Platform
- 109.4K Database Software
- 17.5K Enterprise Manager
- 8.8K Hardware
- 71.1K Infrastructure Software
- 105.2K Integration
- 41.6K Security Software
Check file exist and start mapping

Hello everyone, is it possible to check whether a file exists in the loading plan using the variables or CASE WHEN conditions?
Then I would like to start a mapping if the file is available.
Currently I'm running the mapping which takes the file and imports it( in exception mode - throw no error). But I would like to have the exception so that the loading plan breaks off at the beginning if the data is corrupt.
I would like to do this in the loading plan, since it is possible to see the inserted data records here. Is this possible and if so how?
Best Answer
-
Since you have multiple files and they are independent of each other, I would probably create a package for each mapping with something similar to this:
If the file is not there, it goes to dummy step, but does not log as an error (the step is still an error, but the overal package is not):
If the file exists, it goes to the mapping.
I hope it helps.
Answers
-
I would probably try to add OdiFileWait object in a scenario and set it to throw an error if the file is not found:
Then I would put it in the Load Plan as the first step and set an exception if you want to handle it (or maybe just leave it as an error).
Hope it helps.
-
Hello and thank you for yourfeedback.
Unfortunately I have a different use case. In my loadplan, I load different files into a different stage tables one after the other. Here it can happen that one of these files was not delivered. Nevertheless, it should continue to be loaded.
I've set the exception to Ignore, but I don't like these solutions very much, because the operator still logs an error and the logs fill up. With daily loading, this becomes confusing.
Is it possible not to log this or should I implement it in antoher way?
What is the best practise for this?
-
Since you have multiple files and they are independent of each other, I would probably create a package for each mapping with something similar to this:
If the file is not there, it goes to dummy step, but does not log as an error (the step is still an error, but the overal package is not):
If the file exists, it goes to the mapping.
I hope it helps.