From 13b9e8b05018c9eef68b2bae7b30a20d90a89290 Mon Sep 17 00:00:00 2001 From: Michal Charemza Date: Wed, 4 Dec 2024 09:14:22 +0000 Subject: [PATCH] fix: carry on in the face of more arrow-exceptions There are more Parquet-related exceptions that prevent the file format conversion from progressing. Instead of continuing to add to the list of exception types, have found the PyArrow exception base class at https://github.com/apache/arrow/blob/fb8e8122f623f4548b22ece7485c4570d7ece1a6/python/pyarrow/error.pxi#L33C7-L33C21 --- app_worker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app_worker.py b/app_worker.py index efbd506..da9faa3 100644 --- a/app_worker.py +++ b/app_worker.py @@ -353,7 +353,7 @@ def get_num_statements_with_rows(query_multi, script): try: aws_multipart_upload(signed_s3_request, s3_key, stream_write_parquet(cols, rows)) - except (pa.ArrowNotImplementedError, pa.ArrowTypeError): + except pa.ArrowException: logger.exception('Unable to convert to parquet') # ... and as ODS with the results of each statement as a separate sheet