Skip to main content
Solved

Incorrect results from StatisticsCalculator's cumulative output

  • November 21, 2019
  • 12 replies
  • 67 views

Hello!

I've been having some issues with the cumulative output from StatisticsCalculator - it seems to be giving me the complete sum rather than cumulative sum of the chosen attribute.

Simplified example:

Anyone come across similar issues? Suspect this might be a bug.

Cheers!

Best answer by fmelizard

Sorry about this one. Backport can't happen...but a fix still can. In FME 2020 we've redone the StatisticsCaculator to work in bulk mode and so you should expect a pretty good speedup (final #s still being calculated).

In FME 2019.x, there is an unfortunate interaction between bulk mode and the unique way StatisticsCalculator was written that affects the Cumulative port. A fix is in the works -- watch this space. In the meantime putting a PythonCaller (or AttributeKeeper) in front to blow up the feature table will do the trick.

We'll post back here when the fix is made. Thanks for letting us know, sorry again.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

12 replies

mark2atsafe
Safer
Forum|alt.badge.img+56
  • Safer
  • 2554 replies
  • November 21, 2019

To be honest I just tried it and everything looked fine.

Could it be to do with caching? Maybe it's reading from an old cache instead of new data? Perhaps try Shift+F5 to run, erasing all the caches.

What version of FME do you have? Then I can look it up to see if it's a known issue.


  • Author
  • 4 replies
  • November 21, 2019

To be honest I just tried it and everything looked fine.

Could it be to do with caching? Maybe it's reading from an old cache instead of new data? Perhaps try Shift+F5 to run, erasing all the caches.

What version of FME do you have? Then I can look it up to see if it's a known issue.

Hi Mark, cheers.

Erasing caches didn't work unfortunately.

I'm running 2019.1 (Build 19608). Strange thing is it works on my colleague's version without a hitch - he's on the 2018 version


mark2atsafe
Safer
Forum|alt.badge.img+56
  • Safer
  • 2554 replies
  • November 21, 2019

To be honest I just tried it and everything looked fine.

Could it be to do with caching? Maybe it's reading from an old cache instead of new data? Perhaps try Shift+F5 to run, erasing all the caches.

What version of FME do you have? Then I can look it up to see if it's a known issue.

Hmmm. I also wonder if it's something to do with the new bulk mode. Can you put a Sampler transformer before it, and just set it to randomize sampling? That should (I think) break up the bulk mode. Then if the StatsCalc works as expected then we'll know.


  • Author
  • 4 replies
  • November 21, 2019

To be honest I just tried it and everything looked fine.

Could it be to do with caching? Maybe it's reading from an old cache instead of new data? Perhaps try Shift+F5 to run, erasing all the caches.

What version of FME do you have? Then I can look it up to see if it's a known issue.

No joy there either! Still getting the final sum


mark2atsafe
Safer
Forum|alt.badge.img+56
  • Safer
  • 2554 replies
  • November 21, 2019

No joy there either! Still getting the final sum

I think the bulk mode is what's causing it though. If I create some random features then it works fine, but if I read from a format that supports bulk mode, I get the same issue. I'll query the developers, but in the meantime I'll try and find a way to drop out of bulk mode to prove that's the issue and give us a workaround.


  • Author
  • 4 replies
  • November 21, 2019

I think the bulk mode is what's causing it though. If I create some random features then it works fine, but if I read from a format that supports bulk mode, I get the same issue. I'll query the developers, but in the meantime I'll try and find a way to drop out of bulk mode to prove that's the issue and give us a workaround.

Ah okay, does sound like that's the suspect. Thanks for looking into it for me! Much appreciated. A workaround would do just fine for the moment :)


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • November 21, 2019

This looks to be the same issue

https://knowledge.safe.com/questions/102581/statisticscalculator-suddenly-not-yielding-the-sam.html

 

If you add a python caller prior to the statistics calculator, it seems to sort it out (you don't appear to need any code other than the default)


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • November 21, 2019

To be honest I just tried it and everything looked fine.

Could it be to do with caching? Maybe it's reading from an old cache instead of new data? Perhaps try Shift+F5 to run, erasing all the caches.

What version of FME do you have? Then I can look it up to see if it's a known issue.

This looks to be the same issue

https://knowledge.safe.com/questions/102581/statisticscalculator-suddenly-not-yielding-the-sam.html

 

If you add a python caller prior to the statistics calculator, it seems to sort it out (you don't appear to need any code other than the default)


mark2atsafe
Safer
Forum|alt.badge.img+56
  • Safer
  • 2554 replies
  • November 21, 2019

This looks to be the same issue

https://knowledge.safe.com/questions/102581/statisticscalculator-suddenly-not-yielding-the-sam.html

 

If you add a python caller prior to the statistics calculator, it seems to sort it out (you don't appear to need any code other than the default)

Perfect. I found Aggregator/Deaggregator, but PythonCaller is much easier. So that's the workaround for now @evanrichards_. It seems like this is fixed in FME2020 but I've asked if we can get a backport to a 2019 release (2019.2.x or something) so you can get it working sooner.


mark2atsafe
Safer
Forum|alt.badge.img+56
  • Safer
  • 2554 replies
  • November 21, 2019

Ah okay, does sound like that's the suspect. Thanks for looking into it for me! Much appreciated. A workaround would do just fine for the moment :)

Yeah, sadly, for technical reasons, I don't think a backport can happen, so we'll be stuck with the workaround until 2020. But if it's working for you right now with that workaround, then that's good.


  • Author
  • 4 replies
  • November 22, 2019

Perfect. I found Aggregator/Deaggregator, but PythonCaller is much easier. So that's the workaround for now @evanrichards_. It seems like this is fixed in FME2020 but I've asked if we can get a backport to a 2019 release (2019.2.x or something) so you can get it working sooner.

Perfect! The PythonCaller works for me. Thanks both for the help :)


fmelizard
Safer
Forum|alt.badge.img+20
  • Safer
  • 3719 replies
  • Best Answer
  • November 23, 2019

Sorry about this one. Backport can't happen...but a fix still can. In FME 2020 we've redone the StatisticsCaculator to work in bulk mode and so you should expect a pretty good speedup (final #s still being calculated).

In FME 2019.x, there is an unfortunate interaction between bulk mode and the unique way StatisticsCalculator was written that affects the Cumulative port. A fix is in the works -- watch this space. In the meantime putting a PythonCaller (or AttributeKeeper) in front to blow up the feature table will do the trick.

We'll post back here when the fix is made. Thanks for letting us know, sorry again.