I cannot seem to find any documentation, but I want to understand how I can do the following:
- We have Spark pipelines that write data to S3 in the standard format where they write several
part-...files and the_SUCCESSfile to the folder. - We then have further Spark pipelines that read data from those S3 buckets.
- We would like to have the pipelines automatically throw an exception (fail) if they try to read from a folder that does not have the
_SUCCESSfile. - We can create some sort of user-created function to manage this test, but it seems so common that I figured there must be an easy Spark-native way to generate this exception if the file is not found.
Is there such a native Spark way to trigger that exception?