Azure DP-203 Exam: Init Scripts for Databricks Spark - Best Practices

Init Scripts for Databricks Spark

Question

Bryan is executing an init script which is required to run a bootstrap script during the Databricks Spark driver or worker node startup.

Which kind of init script can he choose?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answer: C.

In Databricks, an init script is a script that runs on a cluster node before the Spark driver or worker process starts. This script can be used to install software dependencies, configure environment variables, or set up other system-level configurations required for the cluster.

There are three types of init scripts in Databricks, which are:

A. Global Init Scripts: Global init scripts are executed on every node of the Databricks cluster, regardless of the workspace, cluster or job. Global init scripts can be added from the 'Clusters' or 'Jobs' pages in the Databricks workspace.

B. Job Init Scripts: Job init scripts are executed only on the nodes that are allocated to run a specific job. Job init scripts can be added while configuring a job in the 'Advanced Options' section.

C. Cluster-Scoped Init Scripts: Cluster-scoped init scripts are executed only on the nodes that belong to a specific Databricks cluster. Cluster-scoped init scripts can be added from the 'Clusters' page in the Databricks workspace.

Therefore, the correct answer to the question is C. Cluster-Scoped. Bryan can choose to use a cluster-scoped init script to run a bootstrap script during the Databricks Spark driver or worker node startup.