Date Posted:
Product: TIBCO Spotfire®
Product: TIBCO Spotfire®
Problem:
Cloudera Impala Connector throwing Error when using COUNT(DISTINCT) aggregate functions with multiple columns in Spotfire.
Solution:
Description:
Cloudera Impala Exception - DISTINCT aggregate functions need to have the same set of parameters as count(DISTINCT transaction.column_name); deviating function: count(DISTINCT transaction.Column_name)
Symptoms:
If the same parameters are not set, you may see the following error.
"Error while executing a query in Impala: [HY000] : AnalysisException: all DISTINCT aggregate functions need to have the same set of parameters as count(DISTINCT transaction.Column_name_1); deviating function: count(DISTINCT transaction.column_name_2)".
Option 1). Remove the multiple columns.
Option 2). Use the SET statement APPX_COUNT_DISTINCT which allows multiple COUNT(DISTINCT) operations within a single query.
The following is from Cloudera - https://impala.apache.org/docs/build/html/topics/impala_query_options.html .
"In Impala 2.0 and later, you can set query options directly through the JDBC and ODBC interfaces by using the SET statement. Formerly, SET was only available as command within the impala-shell interpreter."
https://impala.apache.org/docs/build/html/topics/impala_set.html#set
Comments
0 comments
Article is closed for comments.