what code are you using?
I was just logging the status in case of success and failure to see the difference before writing out the whole code. The following is in the AftImport.py script:
stat = fdmAPI.getProcessStates(fdmContext["LOADID"])
fdmAPI.logInfo("Import Status: " + str(stat["IMPSTATUS"]))
In case of success of import step, the aftimport.py gets executed and I get the following in the process log:
2017-09-13 14:15:00,482 INFO [AIF]: Executing the following script: ****************************/data/scripts/event/AftImport.py
2017-09-13 14:15:00,533 INFO [AIF]: Import Status: 0
But the aftimport never executes when the import step fails. So I don't even get the "Executing the following script.... " line in the log.
What is causing your import to fail, what does your log say when the process fails?
I have tried two scenarios for the import step failure
- I have passed a nonsense file for a file based import
- I have used a syntactically wrong mapping in OIA interface in ODI
Same result in both cases.
Does the aftimport.py script not run after the import step fails?
No,I don't think it runs in fail case.You may delete an existing map vs your data file to create a validation failure which shall help you to get aftimport script to get executed.
Let us know.