An upstream system has been configured to pass the date for a given batch of data to the Databricks Jobs API as a parameter. The notebook to be scheduled will use this parameter to load data with the following code: df = spark.read.format("parquet").load(f"/mnt/source/(date)") Which code block should be used to create the date Python variable used in the above code block?
- Adate = spark.conf.get("date")
- Binput_dict = input() date= input_dict["date"]
- Cimport sys date = sys.argv[1]
- Ddate = dbutils.notebooks.getParam("date")
- Edbutils.widgets.text("date", "null") date = dbutils.widgets.get("date") (correct answer)
Reveal answer & explanationHide answer
The correct answer is E. Option E: dbutils.widgets.text("date", "null") date = dbutils.widgets.get("date")





