0

Is there a way to define a Hive table with jagged header files. keep nulls for missing columns? I have tsv files with different header lines. i.e.:

Name  Age  Height
Chris 48   5'10"
Jim   25   5'11"

then another file

Name Group Age Height
Bill Acct  32  5'5"
Amy  Bllg  35  5'6"
dtolnay
  • 9,621
  • 5
  • 41
  • 62
Chris Hayes
  • 3,876
  • 7
  • 42
  • 72

1 Answers1

1

There is no solution to do it directly. You need to do in two steps:

  1. Load file X into temporary table.

  2. Insert values from temporary table into final table.

Same question is here.

F.Lazarescu
  • 1,385
  • 2
  • 16
  • 31
  • 1
    thank you, i think if i'm doing 2 steps then I can probably also just transform the data through another process into single line jsons – Chris Hayes May 17 '19 at 19:02