You're right , Missed it We do need to specify SET keyword ps.execute("set hive.exec.dynamic.partition.mode=nonstrict") ;
Hope that works !!! How about option 1 , specifying in URL works ??? On Tuesday, November 25, 2014, Guy Doulberg <guy.doulb...@perion.com> wrote: > Thanks > > > > Isn’t the second is actually what I am doing? > > > > I tried to remove the “SET” keyword and got sql exception. > > > > > > > > *From:* Karthik Banala [mailto:karthikban...@gmail.com > <javascript:_e(%7B%7D,'cvml','karthikban...@gmail.com');>] > *Sent:* Tuesday, November 25, 2014 5:03 PM > *To:* user@hive.apache.org > <javascript:_e(%7B%7D,'cvml','user@hive.apache.org');> > *Subject:* Re: using "SET" with JDBC > > > > Hi , > > > > Two ways of doing it - > > > > 1. You can specify the configuration parameter in the JDBC URL while > establishing the connection > > > > > jdbc:hive2://*serverName*:*port*?hive.exec.dynamic.partition.mode=nonstrict > ; > > > > 2. Using statement/prepared statement > > > > ps.execute("hive.exec.dynamic.partition.mode=nonstrict") ; > > > > Regards, > > Karthik B > > > > > > On Tue, Nov 25, 2014 at 4:07 AM, Guy Doulberg <guy.doulb...@perion.com > <javascript:_e(%7B%7D,'cvml','guy.doulb...@perion.com');>> wrote: > > Hi > > > > I am trying to use “SET” keyword in queries running using JDBC. > > > > For example: > > SET hive.exec.dynamic.partition.mode=nonstrict; > > SET hive.exec.dynamic.partition=true; > > SET hive.exec.max.created.files=1000000; > > Select count(*) from table; > > > > > > In order to do that , I split by “;” > > And then execute each of the lines using a for loop > > > > for (String line : liness) { > > stmt.execute(query); > > } > > > > > > I can see that the configuration do not passed correctly to the job > > > > I can see in the configuration of the job running these conf ( with the > “set” keyword): > > > > hive.exec.dynamic.partition.mode nonstrict > > SET hive.exec.dynamic.partition true; > > SET hive.exec.max.created.files 1000000 > > > > How should I pass “set ” parameters using JDBC > > > > Thanks, > > > > *Guy Doulberg, * > > > > > > -- > > Best Regards, > > Karthik Banala > > Ph No: 408-476-4580 > -- Best Regards, Karthik Banala Ph No: 408-476-4580