Lab 5.1 – Generation Error from Transformation

The transform stats block is throwing a generation error, seemingly from the code that was copied and pasted from the lab document. I’ve attached a picture of the error, here is the message as well:

Error found during code generation: Invocation of the procedure Analyze.Enrich.PumpStatusMonitor.PumpStatusMonitor_PumpEvent_EventHandler_TempStatsStateGet expected 0 parameter(s) (), but was called with 1 (including the target, if any).

This is what I have in the section it seems to be referring to (as copied from the manual)

statsObj – PumpStatusMonitor.PumpStatusMonitor_PumpEvent_EventHandler_TempStatsStateGet(event.PumpId)

You must be logged in to view attached files.
Posted: July 1, 2022 at 5:19 pm
Replies: 2
Jul 1, 2022
Posted by Lisa Ackerman

Hi Clayton!

It appears that you haven’t used the SplitByGroup pattern, which we called SplitByPump.  Without that, the State memory is global, not partitioned, so the “getter” procedure won’t need or want any parameters.  However, once the feed is split, the memory is indeed partitioned and needs the partitionKey as a parameter.

Long story short, you missed a step way back in Lab 4.3 to do the split.  Take a look and let me know how it goes!

–lisa, training dept


Jul 1, 2022
Posted by Clayton Wiley

Yep, you’re absolutely right! Turns out I didn’t forget the SplitByGroup pattern, I just didn’t connect the TempStats block to it. For some reason, I connected it to the SavePumpStatus block instead which is very wrong. Just had to reconnect it. Thanks for your help!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
© Vantiq 2024 All rights reserved  •  Vantiq Corporation’s Privacy Policy and Cookie Policy