Free Databricks Certified Associate Developer for Apache Spark 3.0 Exam Databricks-Certified-Associate-Developer-for-Apache-Spark-3.0 Exam Practice Test

UNLOCK FULL
Databricks-Certified-Associate-Developer-for-Apache-Spark-3.0 Exam Features
In Just $59 You can Access
  • All Official Question Types
  • Interactive Web-Based Practice Test Software
  • No Installation or 3rd Party Software Required
  • Customize your practice sessions (Free Demo)
  • 24/7 Customer Support
Page: 1 / 36
Total Questions: 180
  • The code block shown below should return the number of columns in the CSV file stored at location filePath. From the CSV file, only lines should be read that do not start with a # character. Choosethe answer that correctly fills the blanks in the code block to accomplish this.Code block:__1__(__2__.__3__.csv(filePath, __4__).__5__)

    Answer: 5 Next Question
  • The code block displayed below contains an error. The code block should return all rows of DataFrame transactionsDf, but including only columns storeId and predError. Find the error.Code block:spark.collect(transactionsDf.select('storeId', 'predError'))

    Answer: 5 Next Question
  • The code block shown below should return only the average prediction error (column predError) of a random subset, without replacement, of approximately 15% of rows in DataFrametransactionsDf. Choose the answer that correctly fills the blanks in the code block to accomplish this.transactionsDf.__1__(__2__, __3__).__4__(avg('predError'))

    Answer: 2 Next Question
  • Which of the following statements about lazy evaluation is incorrect?

    Answer: 2 Next Question
  • Which of the following describes the difference between client and cluster execution modes?

    Answer: 1 Next Question
  • The code block shown below should write DataFrame transactionsDf as a parquet file to path storeDir, using brotli compression and replacing any previously existing file. Choose the answer thatcorrectly fills the blanks in the code block to accomplish this.transactionsDf.__1__.format('parquet').__2__(__3__).option(__4__, 'brotli').__5__(storeDir)

    Answer: 3 Next Question
  • The code block displayed below contains an error. The code block should merge the rows of DataFrames transactionsDfMonday and transactionsDfTuesday into a new DataFrame, matchingcolumn names and inserting null values where column names do not appear in both DataFrames. Find the error.Sample of DataFrame transactionsDfMonday:1. +-------------+---------+-----+-------+---------+----+2. |transactionId|predError|value|storeId|productId| f|3. +-------------+---------+-----+-------+---------+----+4. | 5| null| null| null| 2|null|5. | 6| 3| 2| 25| 2|null|6. +-------------+---------+-----+-------+---------+----+Sample of DataFrame transactionsDfTuesday:1. +-------+-------------+---------+-----+2. |storeId|transactionId|productId|value|3. +-------+-------------+---------+-----+4. | 25| 1| 1| 4|5. | 2| 2| 2| 7|6. | 3| 4| 2| null|7. | null| 5| 2| null|8. +-------+-------------+---------+-----+Code block:sc.union([transactionsDfMonday, transactionsDfTuesday])

    Answer: 5 Next Question
  • The code block shown below should return a single-column DataFrame with a column named consonant_ct that, for each row, shows the number of consonants in column itemName of DataFrameitemsDf. Choose the answer that correctly fills the blanks in the code block to accomplish this.DataFrame itemsDf:1. +------+----------------------------------+-----------------------------+-------------------+2. |itemId|itemName |attributes |supplier |3. +------+----------------------------------+-----------------------------+-------------------+4. |1 |Thick Coat for Walking in the Snow|[blue, winter, cozy] |Sports Company Inc.|5. |2 |Elegant Outdoors Summer Dress |[red, summer, fresh, cooling]|YetiX |6. |3 |Outdoors Backpack |[green, summer, travel] |Sports Company Inc.|7. +------+----------------------------------+-----------------------------+-------------------+Code block:itemsDf.select(__1__(__2__(__3__(__4__), 'a|e|i|o|u|\s', '')).__5__('consonant_ct'))

    Answer: 4 Next Question
  • Which of the following code blocks creates a new DataFrame with two columns season and wind_speed_ms where column season is of data type string and column wind_speed_ms is of data typedouble?

    Answer: 2 Next Question
  • Which of the following code blocks displays the 10 rows with the smallest values of column value in DataFrame transactionsDf in a nicely formatted way?

    Answer: 2 Next Question
Page: 1 / 36
Total Questions: 180