Salesforce Certified MuleSoft Developer Practice Questions

Salesforce Certified MuleSoft Developer exam preparationAligned with the official Exam Guide (Spring '24 release; guide version 13)

Salesforce Certified MuleSoft Developer practice questions in English: 180 questions with explanations. The mock exam has 60 questions and 120 minutes.

Salesforce Certified MuleSoft Developer free question 7 / 10 · Domain 6: Using Connectors

A nightly job runs an Execute script operation whose script has three statements, in this order: an UPDATE that changes 12 rows, an INSERT ... SELECT that copies 40 rows into a history table, and a DELETE that removes the same 40 rows. The script runs without error. What is the payload after the operation?

  1. The array [12, 40, 40], with the count of each statement in order
  2. The number 92, the total of rows that the whole script affected
  3. The number 3, the count of statements that the script executed
  4. The number 40, the rows affected by the last statement of the script
Show the answer and explanation

Answer: A

Why this is correct
Execute script runs an SQL script of any length as a single database statement, and the script can contain multiple statements of different types, such as UPDATE, INSERT and DELETE here. The page defines the result: executing a script returns an array of integers, one element per executed statement, and each integer represents the number of objects affected by the statement. The three statements affect 12, 40 and 40 rows, so the payload is an array of three integers with those values. A later component can check each element, for example to confirm that the rows copied into the history table match the rows deleted from the online table.

Why the other options are wrong
"The number 92, the total of rows that the whole script affected" … The counts are not added up. The result has one element per executed statement, so the three numbers stay separate.
"The number 3, the count of statements that the script executed" … The elements are not a count of statements. Each integer represents the number of objects affected by its statement, so the values are 12, 40 and 40.
"The number 40, the rows affected by the last statement of the script" … The result covers every statement, not only the last one: executing a script returns an array of integers, one element per executed statement.

Checking a script result
Read the result element by element. For a data rotation job, compare the element of the copy with the element of the purge before the job reports success, and log the array so a short run is visible.

Go to the Salesforce Certified MuleSoft Developer practice app (10 free questions; purchase unlocks all questions)

See the full practice set