I am new to hadoop hive. I am using open source hadoop 2.7.1 hive 1.2.2. It is installed on ubuntu a single node cluster. I have 106 rows and 30 columns data in csv file. I import it into hive table using following code:
CREATE TABLE clinicaldatabc (comp_tcga_id String, gender String, age_inti_diag int, ER_status String, PR_status String, HER2_final_status String, Tumor String, Tumor_T1_code String, Node String, Node_coded String, Metastasis String, Metastasis_coded String, AJCC_Stage String, Converted_stage String, Survival_dt_from String, Vital_Status String, d_to_date_of_last_contact int, d_to_Day_of_Death int, OS_event int,OS_time int, PAM50_mRNA String, SigClust_unsupervised_mRNA int, SigClust_intrinsic_mRNA int, miRNA_clusters int, methylation_clusters int,RPPA_clusters int, CN_clusters int, integrated_clusters_with_PAM50 int, integrated_cluster_no_exp int, integrated_clusters_unsup_exp int)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ',';
Then I got null column name: first half of returns second half of returns
Please help me how to solve it. Thank you in advance!
答案 0 :(得分:0)
NULL column names in Hive query result
可能重复这里要注意的第一件事是NULL值出现在不是string
类型的列中答案 1 :(得分:0)
有个推荐
CREATE EXTERNAL TABLE IF NOT EXISTS ejREGandTEST(
DBN STRING,
School_name STRING,
Year_of_SHST INT,
Grade_level INT,
Enrollment INT,
Number_of_registered INT,
Number_students_SHSAT INT)
row format delimited fields terminated by ','
location "/user/ebin/kaggleData/csv"
TBLPROPERTIES("skip.header.line.count"="1");