Quiz Databricks-Certified-Professional-Data-Engineer: Databricks Certified Data Engineer Professional
Quiz
usagewithintheirDatabricksworkspaceforbetterresourceutilizationandcostcontrol.Theteam
decidedtouseDatabrickssystemtables,availableunderthesystemcataloginUnityCatalog,togain
detailedvisibilityintoworkspaceactivity.WhichSQLqueryshouldtheteamrunfromthesystem
catalogtoachievethis?
Quiz
JobsAPIasaparameter.Thenotebooktobescheduledwillusethisparametertoloaddatawiththe
followingcode:
df=spark.read.format("parquet").load(f"/mnt/source/(date)")
WhichcodeblockshouldbeusedtocreatethedatePythonvariableusedintheabovecodeblock?
A.date=spark.conf.get("date")
B.input_dict=input()date=input_dict["date"]
C.importsysdate=sys.argv[1]
D.date=dbutils.notebooks.getParam("date")
E.dbutils.widgets.text("date","null")date=dbutils.widgets.get("date")
is:
dbutils.widgets.text(“date”,“null”)date=dbutils.widgets.get(“date”)
Thiscodeblockusesthedbutils.widgetsAPItocreateandgetatextwidgetnamed“date”thatcan
acceptastringvalueasaparameter1.Thedefaultvalueofthewidgetis“null”,whichmeansthatif
[http://www.justcerts.com](http://www.justcerts.com)
Questions&AnswersPDF P-3
noparameterispassed,thedatevariablewillbe“null”.However,ifaparameterispassedthrough
theDatabricksJobsAPI,thedatevariablewillbeassignedthevalueoftheparameter.Forexample,if
theparameteris“2021-11-01”,thedatevariablewillbe“2021-11-01”.Thisway,thenotebookcan
usethedatevariabletoloaddatafromthespecifiedpath.
Theotheroptionsarenotcorrect,because:
OptionAisincorrectbecausespark.conf.get(“date”)isnotavalidwaytogetaparameterpassed
throughtheDatabricksJobsAPI. Thespark.confAPIisusedtogetorsetSparkconfiguration
properties,notnotebookparameters2.
OptionBisincorrectbecauseinput()isnotavalidwaytogetaparameterpassedthroughthe
DatabricksJobsAPI. Theinput()functionisusedtogetuserinputfromthestandardinputstream,
notfromtheAPIrequest3.
OptionCisincorrectbecausesys.argv1 isnotavalidwaytogetaparameterpassedthroughthe
DatabricksJobsAPI. Thesys.argvlistisusedtogetthecommand-lineargumentspassedtoaPython
script,nottoanotebook4.
OptionDisincorrectbecausedbutils.notebooks.getParam(“date”)isnotavalidwaytogeta
parameterpassedthroughtheDatabricksJobsAPI. Thedbutils.notebooksAPIisusedtogetorset
notebookparameterswhenrunninganotebookasajoborasasubnotebook,notwhenpassing
parametersthroughtheAPI5.
Reference: Widgets, SparkConfiguration, input(), sys.argv, Notebooks
Quiz
engineeringgroups.Tocontrolcosts,clustersaresettoterminateafter30minutesofinactivity.Each
usershouldbeabletoexecuteworkloadsagainsttheirassignedclustersatanytimeoftheday.
Assumingusershavebeenaddedtoaworkspacebutnotgrantedanypermissions,whichofthe
followingdescribestheminimalpermissionsauserwouldneedtostartandattachtoanalready
configuredcluster.
A."CanManage"privilegesontherequiredcluster
B.WorkspaceAdminprivileges,clustercreationallowed."CanAttachTo"privilegesontherequired
cluster
C.Clustercreationallowed."CanAttachTo"privilegesontherequiredcluster
D."CanRestart"privilegesontherequiredcluster
[http://www.justcerts.com](http://www.justcerts.com)
Questions&AnswersPDF P-4
E.Clustercreationallowed."CanRestart"privilegesontherequiredcluster
[https://docs.databricks.com/en/security/auth-authz/access-control/cluster-acl.html](https://docs.databricks.com/en/security/auth-authz/access-control/cluster-acl.html)
Quiz
recoversfromqueryfailuresandkeepscostslow?
A.Cluster:NewJobCluster;Retries:Unlimited;MaximumConcurrentRuns:Unlimited
B.Cluster:NewJobCluster;Retries:None;MaximumConcurrentRuns:1
C.Cluster:ExistingAll-PurposeCluster;Retries:Unlimited;MaximumConcurrentRuns:1
D.Cluster:NewJobCluster;Retries:Unlimited;MaximumConcurrentRuns:1
E.Cluster:ExistingAll-PurposeCluster;Retries:None;MaximumConcurrentRuns:1
active.Retries:SettoUnlimited.[https://docs.databricks.com/en/structured-streaming/query-](https://docs.databricks.com/en/structured-streaming/query-)
recovery.html
Quiz
aDeltaLaketable.Therecent_sensor_recordingstablecontainsanidentifyingsensor_idalongside
thetimestampandtemperatureforthemostrecent5minutesofrecordings.
[http://www.justcerts.com](http://www.justcerts.com)
Questions&AnswersPDF P-5
Thebelowqueryisusedtocreatethealert:

Thequeryissettorefresheachminuteandalwayscompletesinlessthan10seconds.Thealertisset
totriggerwhenmean(temperature)>120.Notificationsaretriggeredtobesentatmostevery1
minute.
Ifthisalertraisesnotificationsfor3consecutiveminutesandthenstops,whichstatementmustbe
true?
A.Thetotalaveragetemperatureacrossallsensorsexceeded120onthreeconsecutiveexecutionsof
thequery
B.Therecent_sensor_recordingstablewasunresponsiveforthreeconsecutiverunsofthequery
C.Thesourcequeryfailedtoupdateproperlyforthreeconsecutiveminutesandthenrestarted
D.Themaximumtemperaturerecordingforatleastonesensorexceeded120onthreeconsecutive
executionsofthequery
E.Theaveragetemperaturerecordingsforatleastonesensorexceeded120onthreeconsecutive
executionsofthequery
whichmeansitwillcalculatethemeantemperatureforeachsensorseparately.Thealertwilltrigger
whenthemeantemperatureforanysensorisgreaterthan120,whichmeansatleastonesensorhad
anaveragetemperatureabove120forthreeconsecutiveminutes.Thealertwillstopwhenthemean
temperatureforallsensorsdropsbelow120.VerifiedReference:[DatabricksCertifiedDataEngineer
[http://www.justcerts.com](http://www.justcerts.com)
Questions&AnswersPDF P-6
Professional],under“SQLAnalytics”section;DatabricksDocumentation,under“Alerts”section.
Quiz
thedevelopmentenvironment.Asharedscreenshotrevealsthatwhilethey'reusinganotebook
versionedwithDatabricksRepos,they'reusingapersonalbranchthatcontainsoldlogic.Thedesired
branchnameddev-2.3.9isnotavailablefromthebranchselectiondropdown.
Whichapproachwillallowthisdevelopertoreviewthecurrentlogicforthisnotebook?
A.UseRepostomakeapullrequestusetheDatabricksRESTAPItoupdatethecurrentbranchto
dev-2.3.9
B.UseRepostopullchangesfromtheremoteGitrepositoryandselectthedev-2.3.9branch.
C.UseRepostocheckoutthedev-2.3.9branchandauto-resolveconflictswiththecurrentbranch
D.MergeallchangesbacktothemainbranchintheremoteGitrepositoryandclonetherepoagain
E.UseRepostomergethecurrentbranchandthedev-2.3.9branch,thenmakeapullrequesttosync
withtheremoterepository
thelatestchangesfromtheremoterepositoryandswitchtothedesiredbranch.Pullingchangeswill
notaffectthecurrentbranchorcreateanyconflicts,asitwillonlyfetchthechangesandnotmerge
them.Selectingthedev-2.3.9branchfromthedropdownwillcheckoutthatbranchanddisplayits
contentsinthenotebook.VerifiedReference:[DatabricksCertifiedDataEngineerProfessional],
under“DatabricksTooling”section;DatabricksDocumentation,under“Pullchangesfromaremote
repository”section.
Quiz
connectingtoanexternaldatabase.
[http://www.justcerts.com](http://www.justcerts.com)
Questions&AnswersPDF P-7
AftertestingthecodewithallPythonvariablesbeingdefinedwithstrings,theyuploadthepassword
tothesecretsmoduleandconfigurethecorrectpermissionsforthecurrentlyactiveuser.Theythen
modifytheircodetothefollowing(leavingallothervariablesunchanged).

Whichstatementdescribeswhatwillhappenwhentheabovecodeisexecuted?
A.Theconnectiontotheexternaltablewillfail;thestring"redacted"willbeprinted.
B.Aninteractiveinputboxwillappearinthenotebook;iftherightpasswordisprovided,the
connectionwillsucceedandtheencodedpasswordwillbesavedtoDBFS.
C.Aninteractiveinputboxwillappearinthenotebook;iftherightpasswordisprovided,the
connectionwillsucceedandthepasswordwillbeprintedinplaintext.
D.Theconnectiontotheexternaltablewillsucceed;thestringvalueofpasswordwillbeprintedin
plaintext.
E.Theconnectiontotheexternaltablewillsucceed;thestring"redacted"willbeprinted.
[http://www.justcerts.com](http://www.justcerts.com)
Questions&AnswersPDF P-8
passwordfromthesecretsmoduleandstoreitinavariable.Thesecretsmoduleallowsusersto
securelystoreandaccesssensitiveinformationsuchaspasswords,tokens,orAPIkeys.The
connectiontotheexternaltablewillsucceedbecausethepasswordvariablewillcontaintheactual
passwordvalue.However,whenprintingthepasswordvariable,thestring“redacted”willbe
displayedinsteadoftheplaintextpassword,asasecuritymeasuretopreventexposingsensitive
informationinnotebooks.VerifiedReference:[DatabricksCertifiedDataEngineerProfessional],
under“SecurityandGovernance”section;DatabricksDocumentation,under“Secrets”section.
Quiz
correctlyimportsandappliestheproductionmodeltooutputthepredictionsasanewDataFrame
namedpredswiththeschema"customer_idLONG,predictionsDOUBLE,dateDATE".

ThedatascienceteamwouldlikepredictionssavedtoaDeltaLaketablewiththeabilitytocompare
allpredictionsacrosstime.Churnpredictionswillbemadeatmostonceperday.
Whichcodeblockaccomplishesthistaskwhileminimizingpotentialcomputecosts?
A.preds.write.mode("append").saveAsTable("churn_preds")
B.preds.write.format("delta").save("/preds/churn_preds")C)
[http://www.justcerts.com](http://www.justcerts.com)
Questions&AnswersPDF P-9

D)

E)

C.OptionA
D.OptionB
E.OptionC
F.OptionD
G.OptionE
Why A is correct
The team wants to save predictions to a Delta Lake table and compare all predictions over time. Since churn predictions are made at most once per day, the data volume is naturally small and the write pattern is simple: append new results each day.
Option A:
preds.write.mode("append").saveAsTable("churn_preds")
This is the best choice because:
1. It appends new daily predictions
- Each run adds a new batch of predictions without overwriting prior ones.
- This preserves historical data, which is necessary to compare predictions over time.
2. It stores the data as a table
- saveAsTable creates or writes to a managed table, which is convenient for analytics and querying.
3. It minimizes compute costs
- Since predictions are only produced once per day, there is no need for more complex transactional logic, partition management, or expensive rewrite operations.
- Append mode is efficient and avoids recomputing existing data.
Why the other options are not as good
- This saves Delta files to a path, but not necessarily as a table.
- While it can work for storage, it does not directly create a queryable table for easy comparison over time.
- It is also less aligned with the requirement than saving as a table.
Any option that overwrites data
- Would destroy historical predictions, making time-based comparison impossible.
Any option using merge/upsert or unnecessary repartitioning
- These are more computationally expensive than simply appending daily prediction results.
- Since the use case is one batch per day, append is sufficient and cheapest.
Key idea
To compare predictions across time, you must keep all past predictions. The simplest and most cost-effective way is to append each day’s prediction output into a Delta table.
Final answer: A
Quiz
Questions&AnswersPDF P-10
AnupstreamsourcewritesParquetdataashourlybatchestodirectoriesnamedwiththecurrent
date.Anightlybatchjobrunsthefollowingcodetoingestalldatafromthepreviousdayasindicated
bythedatevariable:

Assumethatthefieldscustomer_idandorder_idserveasacompositekeytouniquelyidentifyeach
order.
Iftheupstreamsystemisknowntooccasionallyproduceduplicateentriesforasingleorderhours
apart,whichstatementiscorrect?
A.Eachwritetotheorderstablewillonlycontainuniquerecords,andonlythoserecordswithout
duplicatesinthetargettablewillbewritten.
B.Eachwritetotheorderstablewillonlycontainuniquerecords,butnewlywrittenrecordsmay
haveduplicatesalreadypresentinthetargettable.
C.Eachwritetotheorderstablewillonlycontainuniquerecords;ifexistingrecordswiththesame
keyarepresentinthetargettable,theserecordswillbeoverwritten.
D.Eachwritetotheorderstablewillonlycontainuniquerecords;ifexistingrecordswiththesame
keyarepresentinthetargettable,theoperationwilltail.
E.Eachwritetotheorderstablewillrundeduplicationovertheunionofnewandexistingrecords,
ensuringnoduplicaterecordsarepresent.
Questions&AnswersPDF P-11
ThisisthecorrectanswerbecausethecodeusesthedropDuplicatesmethodtoremoveany
duplicaterecordswithineachbatchofdatabeforewritingtotheorderstable.However,thismethod
doesnotcheckforduplicatesacrossdifferentbatchesorinthetargettable,soitispossiblethat
newlywrittenrecordsmayhaveduplicatesalreadypresentinthetargettable.Toavoidthis,abetter
approachwouldbetouseDeltaLakeandperformanupsertoperationusingmergeInto.Verified
Reference:[DatabricksCertifiedDataEngineerProfessional],under“DeltaLake”section;Databricks
Documentation,under“DROPDUPLICATES”section.
Quiz
Databricksnotebooks.Theintendedoutcomeofthebelowcodeistoregisteraviewofallsalesthat
occurredincountriesonthecontinentofAfricathatappearinthegeo_lookuptable.
Beforeexecutingthecode,runningSHOWTABLESonthecurrentdatabaseindicatesthedatabase
containsonlytwotables:geo_lookupandsales.

Whichstatementcorrectlydescribestheoutcomeofexecutingthesecommandcellsinorderinan
interactivenotebook?
A.Bothcommandswillsucceed.Executingshowtableswillshowthatcountriesatandsalesathave
beenregisteredasviews.
B.Cmd1willsucceed.Cmd2willsearchallaccessibledatabasesforatableorviewnamedcountries
[http://www.justcerts.com](http://www.justcerts.com)
Questions&AnswersPDF P-12
af:ifthisentityexists,Cmd2willsucceed.
C.Cmd1willsucceedandCmd2willfail,countriesatwillbeaPythonvariablerepresentinga
PySparkDataFrame.
D.Bothcommandswillfail.Nonewvariables,tables,orviewswillbecreated.
E.Cmd1willsucceedandCmd2willfail,countriesatwillbeaPythonvariablecontainingalistof
strings.
extractthecountrynamesfromthegeo_lookuptableandstoretheminaPythonvariablenamed
countriesaf.Thisvariablewillcontainalistofstrings,notaPySparkDataFrameoraSQLview.Cmd2
iswritteninSQLandtriestocreateaviewnamedsalesafbyselectingfromthesalestablewhere
cityisincountriesaf.However,thiscommandwillfailbecausecountriesafisnotavalidSQLentity
andcannotbeusedinaSQLquery.Tofixthis,abetterapproachwouldbetousespark.sql()to
executeaSQLqueryinPythonandpassthecountriesafvariableasaparameter.VerifiedReference:
[DatabricksCertifiedDataEngineerProfessional],under“LanguageInteroperability”section;
DatabricksDocumentation,under“Mixlanguages”section.
Databricks-Certified-Professional-Data-Engineer: Databricks Certified Data Engineer Professional Practice test unlocks all online simulator questions
Thank you for choosing the free version of the Databricks-Certified-Professional-Data-Engineer: Databricks Certified Data Engineer Professional practice test! Further deepen your knowledge on Databricks Simulator; by unlocking the full version of our Databricks-Certified-Professional-Data-Engineer: Databricks Certified Data Engineer Professional Simulator you will be able to take tests with over 215 constantly updated questions and easily pass your exam. 98% of people pass the exam in the first attempt after preparing with our 215 questions.
BUY NOWWhat to expect from our Databricks-Certified-Professional-Data-Engineer: Databricks Certified Data Engineer Professional practice tests and how to prepare for any exam?
The Databricks-Certified-Professional-Data-Engineer: Databricks Certified Data Engineer Professional Simulator Practice Tests are part of the Databricks Database and are the best way to prepare for any Databricks-Certified-Professional-Data-Engineer: Databricks Certified Data Engineer Professional exam. The Databricks-Certified-Professional-Data-Engineer: Databricks Certified Data Engineer Professional practice tests consist of 215 questions and are written by experts to help you and prepare you to pass the exam on the first attempt. The Databricks-Certified-Professional-Data-Engineer: Databricks Certified Data Engineer Professional database includes questions from previous and other exams, which means you will be able to practice simulating past and future questions. Preparation with Databricks-Certified-Professional-Data-Engineer: Databricks Certified Data Engineer Professional Simulator will also give you an idea of the time it will take to complete each section of the Databricks-Certified-Professional-Data-Engineer: Databricks Certified Data Engineer Professional practice test . It is important to note that the Databricks-Certified-Professional-Data-Engineer: Databricks Certified Data Engineer Professional Simulator does not replace the classic Databricks-Certified-Professional-Data-Engineer: Databricks Certified Data Engineer Professional study guides; however, the Simulator provides valuable insights into what to expect and how much work needs to be done to prepare for the Databricks-Certified-Professional-Data-Engineer: Databricks Certified Data Engineer Professional exam.
BUY NOWDatabricks-Certified-Professional-Data-Engineer: Databricks Certified Data Engineer Professional Practice test therefore represents an excellent tool to prepare for the actual exam together with our Databricks practice test . Our Databricks-Certified-Professional-Data-Engineer: Databricks Certified Data Engineer Professional Simulator will help you assess your level of preparation and understand your strengths and weaknesses. Below you can read all the quizzes you will find in our Databricks-Certified-Professional-Data-Engineer: Databricks Certified Data Engineer Professional Simulator and how our unique Databricks-Certified-Professional-Data-Engineer: Databricks Certified Data Engineer Professional Database made up of real questions:
Info quiz:
- Quiz name:Databricks-Certified-Professional-Data-Engineer: Databricks Certified Data Engineer Professional
- Total number of questions:215
- Number of questions for the test:50
- Pass score:80%
You can prepare for the Databricks-Certified-Professional-Data-Engineer: Databricks Certified Data Engineer Professional exams with our mobile app. It is very easy to use and even works offline in case of network failure, with all the functions you need to study and practice with our Databricks-Certified-Professional-Data-Engineer: Databricks Certified Data Engineer Professional Simulator.
Use our Mobile App, available for both Android and iOS devices, with our Databricks-Certified-Professional-Data-Engineer: Databricks Certified Data Engineer Professional Simulator . You can use it anywhere and always remember that our mobile app is free and available on all stores.
Our Mobile App contains all Databricks-Certified-Professional-Data-Engineer: Databricks Certified Data Engineer Professional practice tests which consist of 215 questions and also provide study material to pass the final Databricks-Certified-Professional-Data-Engineer: Databricks Certified Data Engineer Professional exam with guaranteed success. Our Databricks-Certified-Professional-Data-Engineer: Databricks Certified Data Engineer Professional database contain hundreds of questions and Databricks Tests related to Databricks-Certified-Professional-Data-Engineer: Databricks Certified Data Engineer Professional Exam. This way you can practice anywhere you want, even offline without the internet.
BUY NOW