Re: Data file and table def different number of columns

2013-10-24 Thread Xiu Guo
Yeah, thanks Stephen. I dug~! On Wed, Oct 23, 2013 at 5:58 PM, Stephen Sprague wrote: > yeah. that works as expected. the schema drives the column list in the > select statement (not the hdfs file.) > > you'd have nulls if your schema had *more* columns than the hdfs file had > fields. > > you

Re: Data file and table def different number of columns

2013-10-23 Thread Stephen Sprague
yeah. that works as expected. the schema drives the column list in the select statement (not the hdfs file.) you'd have nulls if your schema had *more* columns than the hdfs file had fields. you dig? On Wed, Oct 23, 2013 at 4:53 PM, Xiu Guo wrote: > We have a table called employee.dat with

Data file and table def different number of columns

2013-10-23 Thread Xiu Guo
We have a table called employee.dat with below contents: 1,ryan,d'souza,it,2 2,michael,fernandes,admin,25000 then in Hive, query: create table myTbl (a INT, b STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' TBLPROPERTIES ("serialization.null.format"="\\N"); LO