Are you sure you are getting the same error even with the schema below (i.e. trying to set a string to an int column?). Can you give the full stack trace that you might see in /tmp/$USER/hive.log?
________________________________ From: Bill Graham <billgra...@gmail.com> Reply-To: <hive-user@hadoop.apache.org>, <billgra...@gmail.com> Date: Thu, 30 Jul 2009 10:02:54 -0700 To: Zheng Shao <zsh...@gmail.com> Cc: <hive-user@hadoop.apache.org> Subject: Re: partitions not being created Based on these describe statements, is what I'm trying to do feasable? I'm basically trying to load the contents of ApiUsageTemp into ApiUsage, with the ApiUsageTemp.requestdate column becoming the ApiUsage.dt partition. On Wed, Jul 29, 2009 at 9:28 AM, Bill Graham <billgra...@gmail.com> wrote: Sure. The only difference I see is that the ApiUsage has a dt partition, instead of the requestdate column: hive> describe extended ApiUsage; OK user string restresource string statuscode int requesthour int numrequests string responsetime string numslowrequests string dt string Detailed Table Information Table(tableName:apiusage, dbName:default, owner:grahamb, createTime:1248884801, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:user, type:string, comment:null), FieldSchema(name:restresource, type:string, comment:null), FieldSchema(name:statuscode, type:int, comment:null), FieldSchema(name:requesthour, type:int, comment:null), FieldSchema(name:numrequests, type:string, comment:null), FieldSchema(name:responsetime, type:string, comment:null), FieldSchema(name:numslowrequests, type:string, comment:null)], location:hdfs://xxxxxxx:9000/user/hive/warehouse/apiusage <http://c18-ssa-dev40-so-qry1.cnet.com:9000/user/hive/warehouse/apiusage> , inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{field.delim= , serialization.format= }), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:dt, type:string, comment:null)], parameters:{}) Time taken: 0.277 seconds hive> describe extended ApiUsageTemp; OK user string restresource string statuscode int requestdate string requesthour int numrequests string responsetime string numslowrequests string Detailed Table Information Table(tableName:apiusagetemp, dbName:default, owner:grahamb, createTime:1248466925, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:user, type:string, comment:null), FieldSchema(name:restresource, type:string, comment:null), FieldSchema(name:statuscode, type:int, comment:null), FieldSchema(name:requestdate, type:string, comment:null), FieldSchema(name:requesthour, type:int, comment:null), FieldSchema(name:numrequests, type:string, comment:null), FieldSchema(name:responsetime, type:string, comment:null), FieldSchema(name:numslowrequests, type:string, comment:null)], location:hdfs://xxxxxxx:9000/user/hive/warehouse/apiusage <http://c18-ssa-dev40-so-qry1.cnet.com:9000/user/hive/warehouse/apiusage> , inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{field.delim= , serialization.format= }), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[], parameters:{last_modified_time=1248826696, last_modified_by=app}) Time taken: 0.235 seconds On Tue, Jul 28, 2009 at 9:03 PM, Zheng Shao <zsh...@gmail.com> wrote: Can you send the output of these 2 commands? describe extended ApiUsage; describe extended ApiUsageTemp; Zheng On Tue, Jul 28, 2009 at 6:29 PM, Bill Graham<billgra...@gmail.com> wrote: > Thanks for the tip, but it fails in the same way when I use a string. > > On Tue, Jul 28, 2009 at 6:21 PM, David Lerman <dler...@videoegg.com> wrote: >> >> >> hive> create table partTable (a string, b int) partitioned by (dt int); >> >> > INSERT OVERWRITE TABLE ApiUsage PARTITION (dt = "20090518") >> > SELECT `(requestDate)?+.+` FROM ApiUsageTemp WHERE requestDate = >> > '2009/05/18' >> >> The table has an int partition column (dt), but you're trying to set a >> string value (dt = "20090518"). >> >> Try : >> >> create table partTable (a string, b int) partitioned by (dt string); >> >> and then do your insert. >> > > -- Yours, Zheng