
Answer-first summary for fast verification
Answer: Use Databricks Jobs and specify the date parameter in the job configuration
The correct approach is to use Databricks Jobs and specify the date parameter in the job configuration. This method is native to Databricks and directly supports scheduling notebooks with parameters. Other options either involve external tools (Azure Data Factory, Apache Airflow) or are not suited for automated job scheduling (using %run command with dbutils.widgets.get("date")). Cron jobs, while capable of scheduling, are not a direct feature of Databricks and do not facilitate parameter passing as required.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A data engineer in Databricks needs to schedule a notebook to run daily, passing the current date as a parameter. What is the most appropriate feature to use and how should the parameter be passed?
A
Schedule the notebook with Cron jobs and use Scala to get the current date
B
Use Databricks Jobs with %run command and pass the date using dbutils.widgets.get("date")
C
Use Databricks Jobs and specify the date parameter in the job configuration
D
Schedule the notebook in Azure Data Factory and pass the date as a pipeline parameter
E
Implement an Apache Airflow DAG to schedule the notebook and pass the date through Airflow macros