Reply
Champion Alumni
Posts: 196
Registered: ‎11-18-2014
Accepted Solution

Impala - set statement forever

ello,

 

 

I would like to set the folowing to true for all my impala queries:

set APPX_COUNT_DISTINCT=true;

 and I can't find any way to do it...

 

I need this, because I have some impala queries that I send over the Impala JDBC Driver and that I would like to optimize.

 

Note: this topic is somehow linked to http://community.cloudera.com/t5/Interactive-Short-cycle-SQL/use-set-command-through-Impala-JDBC-Dri...

 

Thank you!

 

Alina

 

 

GHERMAN Alina
Highlighted
Cloudera Employee
Posts: 82
Registered: ‎12-07-2015

Re: Impala - set statement forever

Hi Alina,

 

you can specify query options by appending them to the connection string for the JDBC driver, separated by semicolon. For example

 

jdbc:impala://me.cloudera.com:21050/default;appx_count_distinct=1

 

Settings you add there will be active for all queries during that JDBC connection. If you want to change defaults for the impalad daemon lifetime you can do so by adjusting IMPALA_SERVER_ARGS as described here: http://www.cloudera.com/documentation/enterprise/5-4-x/topics/impala_config_options.html

 

 Cheers, Lars

Announcements