0
次のハイブテーブルでは、選択出力がヌルとして表示されます。ハイブセレクトはヌル値を出力します
Describe studentdetails;
clustername string
schemaname string
tablename string
primary_key map<string,int>
schooldata struct<alternate_aliases:string,application_deadline:bigint,application_deadline_early_action:string,application_deadline_early_decision:bigint,calendaring_system:string,fips_code:string,funding_type:string,gender_preference:string,iped_id:bigint,learning_environment:string,mascot:string,offers_open_admission:boolean,offers_rolling_admission:boolean,region:string,religious_affiliation:string,school_abbreviation:string,school_colors:string,school_locale:string,school_term:string,short_name:string,created_date:bigint,modified_date:bigint,percent_students_outof_state:float> from deserializer
deletedind boolean
truncatedind boolean
versionid bigint
select * from studentdetails limit 3;
出力:
NULL NULL NULL NULL NULL NULL NULL NULL
NULL NULL NULL NULL NULL NULL NULL NULL
NULL NULL NULL NULL NULL NULL NULL NULL
テーブルを作成している間、私は、次のプロパティを使用していました。
ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe'
WITH SERDEPROPERTIES ("ignore.malformed.json" = "true")
また、データの選択時には次のプロパティがあります。
SET hive.exec.compress.output=true;
SET io.seqfile.compression.type=BLOCK;
SET mapred.output.compression.codec=org.apache.hadoop.io.compress.GzipCodec;
ADD JAR s3://emr/hive/lib/hive-serde-1.0.jar;
あなたは疑問を持っていますか?はいの場合は、明示的にします。オリジナルのJSONも表示します。さらに、あなたの質問のフォーマットを正しく処理してください... –
'show create table studentdetails;'の結果を追加してください。データサンプルの一部は –
です。私は同じ問題がありました。ファイルの行の終わりとは異なるため、 'create external table'スクリプトにあります。 –