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:[email protected]] Sent: Tuesday, November 25, 2014 5:03 PM To: [email protected] 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 <[email protected]<mailto:[email protected]>> 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
