A. The Spark job will likely not run as efficiently as possible.
Which of the following code blocks returns a new DataFrame with column storeReview where the pattern End has been removed from the end of column storeReview in DataFrame storesDF?
A sample DataFrame storesDF is below:
d
Which of the following DataFrame operations is classified as an action?
c
Which of the following operations can be used to return the number of rows in a DataFrame?
d
Which of the following code blocks returns a new DataFrame with a new column employeesPerSqft that is the quotient of column numberOfEmployees and column sqft, both of which are from DataFrame storesDF? Note that column employeesPerSqft is not in the original DataFrame storesDF.
a
The code block shown below contains an error. The code block is intended to return a new DataFrame that is the result of a cross join between DataFrame storesDF and DataFrame employeesDF. Identify the error.
Code block:
storesDF.join(employeesDF, cross)
c
Which of the following will occur if there are more slots than there are tasks?
d
A. The Spark job will likely not run as efficiently as possible.
The code block shown below contains an error. The code block intended to return a new DataFrame that is the result of an inner join between DataFrame storesDF and DataFrame employeesDF on column storeId. Identify the error.
Code block:
StoresDF.join(employeesDF, Seq(storeId)
c
The code block shown below should read a CSV at the file path filePath into a DataFrame with the specified schema schema. Choose the response that correctly fills in the numbered blanks within the code block to complete this task.
Code block:
__1__.__2__.__3__(__4__).format(csv).__5__(__6__)
b
Which of the following code blocks returns a new DataFrame where column division from DataFrame storesDF has been replaced and renamed to column state and column managerName from DataFrame storesDF has been replaced and renamed to column managerFullName?
a
The code block shown below should return a new DataFrame that is the result of an inner join between DataFrame storeDF and DataFrame employeesDF on column storeId. Choose the response chat correctly fills in the numbered blanks within the code block to complete this task.
Code block:
storesDF.__1__(__2__, __3__, __4__)
d
B. storesDF.withColumn("storeReview", regexp_replace(col("storeReview"), " End$", ""))