I am working in ArcGIS Pro 2.8.2. I am not a professional programmer. I have been writing python code for about a year and a majority of it comes from script I export and piece together using geoprocessing tools and models in ArcGIS Pro. I have written a series of scripts which run automatically at night to update our SDE and also dependent services which serve web maps/apps to the public. The issue is that one of the data sources that assists with these updates is a .csv file created from a batch script that is ran from our CAMA system. Sometimes this batch script doesn't work properly and the file doesn't have complete data which causes all of my scripts to generate files that aren't valid and then consequently, our web maps/apps fail the next day.
What can I add my python scripts to stop running if the source data is incomplete? How would I go about doing this? Any advice is greatly appreciated!