Certification Practice Exams with Real Test Questions & Answers

A junior data engineer is testing the databricks video

 ·  PT1H46M27S  ·  EN

data-engineer-professional video for a junior data engineer is testing the following code block to get the newest entry for each item added in the ‘sales’ table

Full Certification Question

A junior data engineer is testing the following code block to get the newest entry for each item added in the ‘sales’ table since the last table update. from pyspark . sql import functions as F from pyspark . sql . window import Window window = Window . partitionBy ( "item_id" ). orderBy ( F . col ( "item_time" ). desc ()) ranked_df = ( spark . readStream . table ( "sales" ) . withColumn ( "rank" , F . rank (). over ( window )) . filter ( "rank == 1" ) . drop ( "rank" ) ) display ( ranked_df ) However, the command fails when executed. Which statement explains the cause of this failure?