Question 51 · 219 in bank
Which of the following code blocks returns a new DataFrame that is the result of a cross join between DataFrame storesDF and DataFrame employeesDF?
Show answer
Answer: A
Databricks Certified Associate Developer for Apache Spark219 questions across 22 pages are complete and free, with no account or card.
219 questions in this bank
Free access · progress saved on this device
Which of the following code blocks returns a new DataFrame that is the result of a cross join between DataFrame storesDF and DataFrame employeesDF?
Answer: A
Which of the following code blocks returns a new DataFrame that is the result of a position-wise union between DataFrame storesDF and DataFrame acquiredStoresDF?
Answer: E
In what order should the below lines of code be run in order to read a parquet at the file path filePath into a DataFrame? Lines of code: 1. storesDF 2. .load(filePath, source = "parquet") 3. .read \ 4. spark \ 5. .read() \ 6. .parquet(filePath)
Answer: 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__)
Answer: E
Which of the following describes slots?
Answer: B
A Spark application has a 128 GB DataFrame A and a 1 GB DataFrame B. If a broadcast join were to be performed on these two DataFrames, which of the following describes which DataFrame should be broadcasted and why?
Answer: D
The correct answer is: B. DataFrame B should be broadcasted because it is smaller and will eliminate the need for the shuffling of itself. Explanation: In Spark, a broadcast join is a specific type of join where one DataFrame is sent to every node in the cluster to avoid the costly network shuffle that can occur with large datasets in regular joins. Generally, the smaller DataFrame should be broadcasted to optimize performance. This is because broadcasting a smaller DataFrame requires less network bandwidth and memory usage across the cluster. Broadcasting DataFrame B (the smaller DataFrame at 1 GB) means that each node will have a local copy of DataFrame B, allowing them to perform the join operation locally with their respective partitions of DataFrame A without needing to shuffle DataFrame B across the network. This approach significantly reduces the amount of data that needs to be shuffled (since only DataFrame A is partitioned across the nodes), thereby improving the performance of the join operation.
Source: Adapted from community discussion — atulrao
Which of the following operations is least likely to result in a shuffle?
Answer: B
Which of the following cluster configurations is least likely to experience delays due to garbage collection of a large DataFrame?

Note: each configuration has roughly the same compute power using 100GB of RAM and 200 cores.
Answer: E
The code block shown below should return a new DataFrame where column productСategories only has one word per row, resulting in a DataFrame with many more rows than DataFrame storesDF. Choose the response that correctly fills in the numbered blanks within the code block to complete this task. A sample of storesDF is displayed below:
Code block: storesDF.__1__(__2__, __3__(__4__(__5__)))
Answer: C
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:
Answer: B
Keyboard:J Kmove between questionsA–Dselect an answerRshow or hide the answer← →change page
SPARK-DEV practice, question 51. 219 questions available.
Version 1.0.0. How we source questions