cancel
Showing results for 
Search instead for 
Did you mean: 

Aggregation operation Count doesn't works

Former Member
0 Kudos

Hi,

The aggregation operation Count doesn’t works on Analytic views in Release 52 of HANA.

I was trying to execute the following simple query:

SELECT j.product_id, COUNT(j.product_id)

FROM "_SYS_BIC"."sap.c3i/AN_PATH_TO_PURCHASE_N" j

GROUP BY j.product_id;

I got this error:

Could not execute 'SELECT j.product_id, COUNT(j.product_id) FROM "_SYS_BIC"."sap.c3i/AN_PATH_TO_PURCHASE_N" j GROUP BY ...' in 3.535 seconds . SAP DBTech JDBC: [2048]: column store error: search table error:  [6900] Error executing physical plan: exception 6900:

AttributeEngine/Parallel/Aggregation.cpp:5521

Attribute engine failed; $function$=createAggregators; $message$=invalid keyfigure C3I:C3I_JOURNEYen PRODUCT_ID@count@

,in executor::Executor in cube: _SYS_BIC:sap.c3i/AN_PATH_TO_PURCHASE_N/olap

If I run the same query on previous releases of HANA like Release51 or Release47 it works perfectly.

Other aggregate operation like sum, min & max works fine even with release52.  Is it a bug in Release52?

Thanks,

Vishnu

Accepted Solutions (0)

Answers (5)

Answers (5)

former_member184768
Active Contributor
0 Kudos

Hi Vishnu,

I tried a similar thing on SPS 06 (Revision 60) and it works fine. Can you please try with the latest revision. It should be quite easy for you, considering you are working for SAP .

Regards,

Ravi

Former Member
0 Kudos

Did you find solution for this?

former_member184768
Active Contributor
0 Kudos

Couple of points.

1) Can you please try to give a column alias to count(j.product_id) AS CPRODID. Just a hunch.

2) Out of curiosity, your package is "sap.c3i". Is this custom created or system generated.

Regards,

Ravi

Former Member
0 Kudos

Hi Ravi,

I tried giving alias, no success. Yes, "sap.c3i" is a custom created package.

Thanks,

Vishnu

patrickbachmann
Active Contributor
0 Kudos

It's sounding more and more like a bug with this 52 release.  Perhaps time to create a message to SAP.

prafful_agrawal
Explorer
0 Kudos

Hi Vishnu,

Use /calculated measure/measure in select statement for your analytic view like

SELECT j.product_id, COUNT(j.product_id),

sum (calculated_measure)

FROM "_SYS_BIC"."sap.c3i/AN_PATH_TO_PURCHASE_N" j

GROUP BY j.product_id;

It will definetly work

Regards

PA

patrickbachmann
Active Contributor
0 Kudos

Either syntax should work.  Are both your HANA db and HANA Studio rev 52?

-Patrick

Former Member
0 Kudos

Hi Patrick,

Yes both HANA DB and HANA studio are on rev. 52.

Even I tried putting some simple counter as a calculated column just to count the product_id, that worked but if I apply order by clause on this new measure counter I got this error:

Query:

SELECT j.product_id, sum(j.counter) as a1

           FROM "_SYS_BIC"."sap.c3i/AN_PATH_TO_PURCHASE_N" j

          GROUP BY j.product_id ORDER BY a1

Error:

Could not execute 'SELECT j.product_id, sum(j.counter) as a1 FROM "_SYS_BIC"."sap.c3i/AN_PATH_TO_PURCHASE_N" j GROUP ...' in 119 ms 630 µs . SAP DBTech JDBC: [2048]: column store error: search table error:  [6900] Error executing physical plan: exception 6900:

AttributeEngine/Parallel/Sort.cpp:705

Attribute engine failed; $function$=sort; $message$=invalid sort col COUNTER

,in executor::Executor in cube: _SYS_BIC:sap.c3i/AN_PATH_TO_PURCHASE_N/olap

The same thing works on previous rev. of HANA DB

Thanks,

Vishnu.

Former Member
0 Kudos

instead of  COUNT(product_id) use COUNT("product_id"), also use exactly the same capitalization.

Former Member
0 Kudos

Hi Harsh,

Tried the same. No success.

Thanks,

Vishnu