Yes, you can set the new default value in hive-site.xml. This will change the default value for all users. If you want to just change for yourself you can put it in .hiverc or set env. variable HIVE_OPTS=-hiveconf hive.exec.dynamic.partition=true -hiveconf hive.exec.dynamic.partition.mode=nonstrict. I think the .hiverc and HIVE_OPTS trick are only available in trunk now.
On Aug 15, 2010, at 12:13 PM, Luke Crouch wrote: Could I do these in the configuration file instead? -L On Sat, Aug 14, 2010 at 6:05 PM, Namit Jain <[email protected]<mailto:[email protected]>> wrote: 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]<mailto:[email protected]>] Sent: Saturday, August 14, 2010 10:38 AM To: <[email protected]<mailto:[email protected]>>; <[email protected]<mailto:[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]<mailto:[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
