以下のようなエラーが出る
Caused by: org.apache.hadoop.mapred.InvalidInputException: Input path does not exist: s3://xxxx/xxxxx
これはGlueのパーティションに指定したs3のパスが存在しない場合に出るエラーだが、Kinesis Firehoseで出力したs3に対して数年分のパーティションを事前作成している場合は困る。特に検証環境とか・・・
エラーを出ないようにするにはspark.sql.hive.verifyPartitionPath
を設定する。
// EMR5.16.0で確認
val spark = SparkSession
.builder()
.config("spark.sql.hive.verifyPartitionPath", true)
.getOrCreate()