exam questions

Exam AZ-220 All Questions

View all questions & answers for the AZ-220 exam

Exam AZ-220 topic 3 question 45 discussion

Actual exam question from Microsoft's AZ-220
Question #: 45
Topic #: 3
[All AZ-220 Questions]

You have an Azure Stream Analytics workspace that contains a Stream Analytics job.

You need to create a JavaScript user-defined aggregate (UDA) method that will recalculate the UDA state based on the previous state and the current event values. The UDA method must be called when an event leaves a SLIDINGWINDOW.

Which UDA method should you use?

  • A. deaccumulateState()
  • B. accumulate()
  • C. computeResult()
  • D. deaccumulate()
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Tyrel
2 years ago
Selected Answer: D
Correct. Method - init() The init() method initializes state of the aggregate. This method is called when window starts. Method – accumulate() The accumulate() method calculates the UDA state based on the previous state and the current event values. This method is called when an event enters a time window (TUMBLINGWINDOW, HOPPINGWINDOW, SLIDINGWINDOW, or SESSIONWINDOW). Method – deaccumulate() The deaccumulate() method recalculates state based on the previous state and the current event values. This method is called when an event leaves a SLIDINGWINDOW or SESSIONWINDOW. Method – deaccumulateState() The deaccumulateState() method recalculates state based on the previous state and the state of a hop. This method is called when a set of events leaves a HOPPINGWINDOW. Method – computeResult() The computeResult() method returns aggregate result based on the current state. This method is called at the end of a time window (TUMBLINGWINDOW, HOPPINGWINDOW, SLIDINGWINDOW, or SESSIONWINDOW).
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...