LoginSignup
0
0

More than 5 years have passed since last update.

sparksqlでhive tableにinsertする歳にparquetのfieldはnullはだめだよーんと怒られる場合

Posted at
  • 生ログをparseしてmap型を持つデータをhiven入れる
  • そのmap型はsize 0の可能性がある

size 0のmap型を含むをrowをhive tableにdf経由でいれるときに
エラーが発生する。

ぱかちょん回避策は

  • size 0の場合は、size 0だよんと教えるように、 Map("null" -> "")みたいなのをいれて、size 1にする。

であればエラーは発生しない。

parquetのバグっぽいので、hiveのissueに上がっている。

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