Skip to main content

Databricks-Certified-Data-Analyst-Associate Databricks Certified Data Analyst Associate

  • Databricks
  • 4 free sample questions

About this exam

Databricks-Certified-Data-Analyst-Associate is the Databricks exam Databricks Certified Data Analyst Associate. Paid practice material for this exam is not available yet, but you can try its free sample questions.

Exam code
Databricks-Certified-Data-Analyst-Associate
Vendor
Databricks
Practice questions
Not available yet
Free sample questions
4
Question bank last updated
Not available yet

Try 2 sample questions

Taken from the free sample set for Databricks-Certified-Data-Analyst-Associate.

Question 1

How can a data analyst determine if query results were pulled from the cache?

  1. Option A:

    Go to the Query History tab and click on the text of the query. The slideout shows if the results came from the cache.

  2. Option B:

    Go to the Alerts tab and check the Cache Status alert.

  3. Option C:

    Go to the Queries tab and click on Cache Status. The status will be green if the results from the last run came from the cache.

  4. Option D:

    Go to the SQL Warehouse (formerly SQL Endpoints) tab and click on Cache. The Cache file will show the contents of the cache.

  5. Option E:

    Go to the Data tab and click Last Query. The details of the query will show if the results came from the cache.

Show answer and explanation

Correct answer: A

Databricks SQL uses a query cache to store the results of queries that have been executed previously. This improves the performance and efficiency of repeated queries. To determine if a query result was pulled from the cache, you can go to the Query History tab in the Databricks SQL UI and click on the text of the query. A slideout will appear on the right side of the screen, showing the query details, including the cache status. If the result came from the cache, the cache status will show “Cached”. If the result did not come from the cache, the cache status will show “Not cached”. You can also see the cache hit ratio, which is the percentage of queries that were served from the cache. References: The answer can be verified from Databricks SQL documentation which provides information on how to use the query cache and how to check the cache status. Reference link: Databricks SQL - Query Cache

Question 2

A Data Analyst is working on sensor_df; this DataFrame contains two columns: record_datetime timestamp and record array.

Which code fragment returns a DataFrame that splits the record column into separate columns and has one array item per row?

  1. Option A:

    Uses withColumn, but selects sensor_id, status, and health as if they are already top-level columns.

  2. Option B:

    Selects nested fields before correctly creating the exploded column.

  3. Option C:

    exploded_df = sensor_df.withColumn( " record_exploded " , explode( " record " ))exploded_df = exploded_df.select( " record_datetime " , " record_exploded.sensor_id " , " record_exploded.status " , " record_exploded.health " )

  4. Option D:

    exploded_df = exploded_df.select( " record_datetime " , " record_exploded " )

Show answer and explanation

Correct answer: C

Option C is correct after correcting the formatting and typing errors in the uploaded option text. The analyst needs explode( " record " ) because the record column is an array, and the requirement is to return one array item per row. Then the analyst must select fields from the exploded struct using dot notation, such as record_exploded.sensor_id, record_exploded.status, and record_exploded.health. Databricks PySpark documentation states that explode “returns a new row for each element in the given array or map,” and withColumn returns a new DataFrame by adding or replacing a column. The select method projects expressions or column names into the resulting DataFrame.

See all 4 free sample questions