Question

StatisticsCalculator not working for min/max for certain attribute

  • 8 March 2024
  • 3 replies
  • 77 views

Badge +5
  • Contributor
  • 25 replies

I’m on 2022.2 and using a StatisticsCalculator with a Group By (based on the name of a CSV) to get statistics (min, max, mean) on a handful of attributes.  It works great for all but 1 attribute (Specific_Gravity) and I can’t figure out why.  The attribute type (64 bit real) is the same between Specific_Gravity and Temperature_F so I’m not sure why one works and the other doesn’t.  The kicker is that I can get Mean values for Specific_Gravity but not Min or Max.

Do I have the transformer configured incorrectly, is it a data type issue, or something else??

Screenshot of transformer with results:

 


3 replies

Userlevel 5
Badge +13

I am not sure that your temperature min and max are reporting correctly either, looking at your screenshot row 19 has a temp value of 71.6 but the max is listed as 71 and an integer.

I tried to replicate your situation by making a csv with the values you had in the screenshot, running them through a statisticscalculator, and it output min/max just fine (also reported the temp max as 71.6 and a real number).
Have you tried running a new statisticscalculator with just the gravity calculations? Does it behave the same way?

Userlevel 2
Badge +11

Hi @jon Do you get this problem with other datasets too? Do you get min & max values for Specific_Gravity without the GroupBy? If you can send us some sample data, please submit a case at https://support.safe.com/s/submit-case

Badge +5

Removing the Group By resolves the issue of getting Min/Max values for Specific_Gravity but doesn’t produce the results I need since it’s treating all rows together - not grouping them by the CSV name.  Adding an Aggregator before the StatisticsCalculator isn’t really a good option either… think I’ll be submitting a case.

Reply