Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Certified Data Engineer Professional All Questions

View all questions & answers for the Certified Data Engineer Professional exam

Exam Certified Data Engineer Professional topic 1 question 1 discussion

Actual exam question from Databricks's Certified Data Engineer Professional
Question #: 1
Topic #: 1
[All Certified Data Engineer Professional Questions]

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?

  • A. date = spark.conf.get("date")
  • B. input_dict = input()
    date= input_dict["date"]
  • C. import sys
    date = sys.argv[1]
  • D. date = dbutils.notebooks.getParam("date")
  • E. dbutils.widgets.text("date", "null")
    date = dbutils.widgets.get("date")
Show Suggested Answer Hide Answer
Suggested Answer: E 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
hal2401me
Highly Voted 2 months ago
Selected Answer: E
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!
upvoted 9 times
...
akashdesarda
Most Recent 1 month, 3 weeks ago
Selected Answer: E
Jobs API allows to sending parameters via jobs parameter. This parameter must have the same notebook params. Eventually, it can be read using dbutils.widgets.get
upvoted 1 times
...
HorskKos
3 months, 2 weeks ago
E is correct because: A - gets configuration of a spark session B - gets a value from a manual input - non relevant for the job run C - sys.argv - gets parameters, which were used to run a Pyrhon script from CMD - completely non-related D - haven't found this function on the web at all, assume that it doesn't exist Therefore E is correct, though it's a bad practice to type a date as a parameter, it's better to get it with datetime library and then use it in the code
upvoted 3 times
...
Shailly
4 months, 2 weeks ago
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.
upvoted 1 times
...
Isio05
5 months, 2 weeks ago
Selected Answer: E
Widgets are used to create parameters in notebook that can be then utilized by e.g. jobs
upvoted 1 times
...
imatheushenrique
5 months, 3 weeks ago
E. E. dbutils.widgets.text("date", "null") date = dbutils.widgets.get("date")
upvoted 1 times
...
AziLa
7 months, 1 week ago
correct ans is E
upvoted 1 times
...
Sosicha
7 months, 2 weeks ago
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.
upvoted 1 times
...
hal2401me
9 months ago
Selected Answer: E
vote for E dbutils.widget
upvoted 1 times
...
AziLa
10 months, 1 week ago
Correct Ans is E
upvoted 1 times
...
Jay_98_11
10 months, 2 weeks ago
Selected Answer: E
E is correct
upvoted 2 times
...
RafaelCFC
10 months, 3 weeks ago
Selected Answer: E
In https://docs.databricks.com/en/notebooks/notebook-workflows.html#dbutilsnotebook-api the "run Example" is an equivalent use-case as E.
upvoted 2 times
...
kz_data
11 months, 1 week ago
Selected Answer: E
E is correct
upvoted 2 times
...
chokthewa
1 year, 1 month ago
I think D is correct answer, refer to https://docs.databricks.com/en/notebooks/notebook-workflows.html#dbutilsnotebook-api
upvoted 1 times
...
BrianNguyen95
1 year, 3 months ago
E is correct answer
upvoted 3 times
unk1102
1 year, 2 months ago
Did you take exam? Are these questions valid?
upvoted 3 times
...
...
lokvamsi
1 year, 3 months ago
Selected Answer: E
Correct. Ans: E
upvoted 1 times
...
Happy_Prince
1 year, 3 months ago
Correct
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...