フリー問題

Databricks Certified Associate Developer for Apache Spark のフリー問題 9 / 20 問目

問題文

A developer wants to apply a Python side effect, such as sending a notification, once per row of a large DataFrame. Which approach is designed for that in Apache Spark?

選択肢

  1. A broadcast variable holding the notification client.
  2. The per-partition iteration action, which runs the function on the executors and lets a connection be opened once per partition.
  3. A collect to the driver followed by a Python loop, which is the recommended pattern because the side effect then happens exactly once per row even when a task is retried on another executor after a failure.
  4. A user-defined function, because side effects belong in an expression.

解答・解説を確認するには

正解と解説の確認、回答の記録には無料登録が必要です。登録すると演習モードでフリー問題に回答し、正誤と解説をその場で確認できます。