0

Avro serde を使用して Hive テーブルを作成しました。以下は、テーブルを作成するために Web サイトからコピーしたコードです。

create table NEW_TABLE
     row format serde 'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
     stored as inputformat 'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat'
     outputformat 'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat'
     tblproperties ('avro.schema.literal'='{
        "name": "my_record",
        "type": "record",
        "fields": [
           {"name":"boolean1", "type":"boolean"},
           {"name":"int1", "type":"int"},
           {"name":"long1", "type":"long"},
           {"name":"float1", "type":"float"},
           {"name":"double1", "type":"double"},
           {"name":"string1", "type":"string"},
           {"name": "nullable_int", "type": ["int", "null"]]}');

テーブルを記述するコマンドを発行すると、次のエラーが表示されました。

hive> describe new_table;
OK
error_error_error_error_error_error_error       string                  from deserializer
cannot_determine_schema string                  from deserializer
check                   string                  from deserializer
schema                  string                  from deserializer
url                     string                  from deserializer
and                     string                  from deserializer
literal                 string                  from deserializer
Time taken: 0.15 seconds, Fetched: 7 row(s)
4

1 に答える 1