Certified Data Engineer Professional Exam QuestionsBrowse all questions from this exam

Certified Data Engineer Professional Exam - Question 1


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?

Show Answer
Correct Answer: D,E

To create the date variable for use in the notebook, the code block should interact with the Databricks Jobs API to retrieve the parameter that has been passed by the upstream system. The appropriate method for this purpose is to use dbutils.notebooks.getParam, which is designed to retrieve parameters passed to the notebook from external sources like the Databricks Jobs API. This ensures that the value of 'date' is accurately obtained from the API, aligning with the requirements of the given scenario.

Discussion

16 comments
Sign in to comment
BrianNguyen95Option: E
Aug 15, 2023

E is correct answer

unk1102
Sep 16, 2023

Did you take exam? Are these questions valid?

hal2401meOption: E
Mar 14, 2024

dbutils.widget. Just passed the exam with score >80%. examtopics covers about 90% of questions. there were 5 questions I didn't see here in examtopics. But friends, you need to look at the discussions, and do test yourself. many answers provided here, even most voted answer, does NOT exists anymore in the exam - not the question, but the answer. Wish you all good luck, friends!

HappyPrince
Aug 2, 2023

Correct

ThunderToes18
Sep 30, 2023

Few questions on the exam... 9/29, wait for an update or more iterations...

kz_dataOption: E
Dec 21, 2023

E is correct

RafaelCFCOption: E
Jan 4, 2024

In https://docs.databricks.com/en/notebooks/notebook-workflows.html#dbutilsnotebook-api the "run Example" is an equivalent use-case as E.

Jay_98_11Option: E
Jan 13, 2024

E is correct

lokvamsiOption: E
Aug 10, 2023

Correct. Ans: E

chokthewaOption: D
Oct 7, 2023

I think D is correct answer, refer to https://docs.databricks.com/en/notebooks/notebook-workflows.html#dbutilsnotebook-api

AziLaOption: E
Jan 21, 2024

Correct Ans is E

hal2401meOption: E
Feb 26, 2024

vote for E dbutils.widget

SosichaOption: D
Apr 14, 2024

Are you reading the question? It asks about an upstream system that has been configured to pass the date for a given batch of data to the Databricks Jobs API as a parameter. Upstream system usually don't use widgets. Widgets they are made for humans. Only C and D are correct but D is better so D.

AziLaOption: E
Apr 19, 2024

correct ans is E

imatheushenriqueOption: E
Jun 1, 2024

E. E. dbutils.widgets.text("date", "null") date = dbutils.widgets.get("date")

Isio05Option: E
Jun 8, 2024

Widgets are used to create parameters in notebook that can be then utilized by e.g. jobs

ShaillyOption: E
Jul 14, 2024

Answer is E. Even though the value is passed from a upstream system, you can create parameters using widgets inside notebook and use the value as an input from the databricks jobs API.