Search code examples
datastage

How do you treat a sequential file stage that cannot find the file similar to an empty table?


I have several datastage jobs that will run, but MIGHT not have the source file there. If not, I want the datastage job to complete similar to if I was using a Source DB Connector and the source table has zero rows.

how can this be done? Thanks


Solution

  • The SequentialFile stage in DataStage expects a file to exists - even it it might be zero bytes in size. One option would be to place a WaitForFile stage in front of your job to avoid the job run if no file exists. This would save efforts for loading lookup data etc. but is not 100% the behavior of an empty table. You could also touch an empty file in that case to get the behavior you want but I doubt this is a good design.