set hive.exec.dynamic.partition=true; set hive.exec.dynamic.partition.mode=nonstrict;
You need to set the above parameters. Thanks, -namit ________________________________________ From: Namit Jain [[email protected]] Sent: Saturday, August 14, 2010 10:38 AM To: <[email protected]>; <[email protected]> Subject: Re: Dynamic Partition Inserts Project needs to be the last column In the select list Also, you need to set a variable to Enable dynamic prtn inserts Sent from my iPhone On Aug 14, 2010, at 9:46 AM, "Luke Crouch" <[email protected]> wrote: > I'm trying to do a dynamic partition insert like so: > > FROM ( > FROM ( > SELECT project, file, os, country, dt > FROM test_downloads WHERE dt='2010-06-30' > CLUSTER BY project, file, dt > ) a > SELECT TRANSFORM(project, file, os, country, dt) > USING '/var/local/sfpy/dstat/dstat/transform/reduce.py -- > test' > AS (project, file, downloads, os, country) > ) b > INSERT OVERWRITE TABLE test_daily_file_totals PARTITION > (dt='2010-06-30 > ', project) > SELECT project, file, downloads, os, country > > The test_daily_file_totals table is created like so: > > CREATE TABLE IF NOT EXISTS {{ table_name }} ( > file STRING, > downloads INT, > os STRING, > country STRING > ) > PARTITIONED BY (dt STRING, project STRING) > ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' > STORED AS TEXTFILE > > But I get an error with the dynamic partition syntax: > > FAILED: Parse Error: line 12:89 mismatched input ')' expecting = in > destination specification > > Can someone see something I'm doing wrong in the sql? I have set > both hive.merge.mapfiles and hive.merge.mapredfiles to false in hive > configuration. > > Thanks, > -L
