AWS Glue ジョブのステータス:Failedと例外処理について

カテゴリ : Glue
公開日 : 2021/07/07 更新日 : 2021/07/07

ジョブの実行ステータス:Failed ≠ ジョブのスクリプト:例外発生

例外発生時にFailedにしたい場合はどうすんのか

  1. 例外処理しない
  2. except内で再度例外を発生させる。↓
import sys

try:
    処理
except Exception as e:
    例外処理
    sys.exit(1)

とか

try:
    処理
except Exception as e:
    例外処理
    raise e

Share

Blogger : rice

Twitter GitHub

SAP
DOP