nerdexam
Microsoft

DP-420 · Question #11

You need to implement a trigger in Azure Cosmos DB for NoSQL that will run before an item is inserted into a container. Which two actions should you perform to ensure that the trigger runs? Each…

The correct answer is C. Register the trigger as a pre-trigger. E. For each create request, set the trigger name in RequestOptions. C: When triggers are registered, you can specify the operations that it can run with. E: When executing, pre-triggers are passed in the RequestOptions object by specifying PreTriggerInclude and then passing the name of the trigger in a List object.

Integrate an Azure Cosmos DB solution

Question

You need to implement a trigger in Azure Cosmos DB for NoSQL that will run before an item is inserted into a container. Which two actions should you perform to ensure that the trigger runs? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

Options

  • AAppend pre to the name of the JavaScript function trigger.
  • BFor each create request, set the access condition in RequestOptions.
  • CRegister the trigger as a pre-trigger.
  • DFor each create request, set the consistency level to session in RequestOptions.
  • EFor each create request, set the trigger name in RequestOptions.

How the community answered

(28 responses)
  • A
    4% (1)
  • B
    7% (2)
  • C
    89% (25)

Explanation

C: When triggers are registered, you can specify the operations that it can run with. E: When executing, pre-triggers are passed in the RequestOptions object by specifying PreTriggerInclude and then passing the name of the trigger in a List object.

Topics

#Azure Cosmos DB#Triggers#Pre-triggers#SDK usage

Community Discussion

No community discussion yet for this question.

Full DP-420 Practice