0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

EMRからSpark SQLでGlueのテーブルを参照するとInvalidInputExceptionが出ることがある

Posted at

以下のようなエラーが出る

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()
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?