Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Impala - set statement forever

avatar
Champion Alumni

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
1 ACCEPTED SOLUTION

avatar
Super Collaborator

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

View solution in original post

1 REPLY 1

avatar
Super Collaborator

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