原来:
CREATE EXTERNAL TABLE csvtable2( symbol string, tickSequence string, timeStamp string, tickdata STRUCT< BID3_SIZE: string, ASK10_SIZE: string> ) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' STORED AS TEXTFILE LOCATION '/mdtick/hk/csv';
变成:
CREATE EXTERNAL TABLE csvtable2( symbol string, tickSequence string, timeStamp string, tickdata string ) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.OpenCSVSerde' WITH SERDEPROPERTIES ( "separatorChar" = ",", "quoteChar" = """, "escapeChar" = "\" ) STORED AS TEXTFILE LOCATION '/mdtick/hk/csv';