Questions and Answers

Question YF4WqeajaJpoNXeCM6g2

Question

A Databricks SQL dashboard has been configured to monitor the total number of records present in a collection of Delta Lake tables using the following query pattern:

SELECT COUNT (*) FROM table -

Which of the following describes how results are generated each time the dashboard is updated?

Choices

  • A: The total count of rows is calculated by scanning all data files
  • B: The total count of rows will be returned from cached results unless REFRESH is run
  • C: The total count of records is calculated from the Delta transaction logs
  • D: The total count of records is calculated from the parquet file metadata

Question G8gcPs6KJSuMozW7eCCo

Question

A Delta Lake table was created with the below query:

//IMG//

Consider the following query:

DROP TABLE prod.sales_by_store -

If this statement is executed by a workspace admin, which result will occur?

Choices

  • A: Data will be marked as deleted but still recoverable with Time Travel.
  • B: The table will be removed from the catalog but the data will remain in storage.
  • C: The table will be removed from the catalog and the data will be deleted.
  • D: An error will occur because Delta Lake prevents the deletion of production data.

Question 9fSEQNbJIEMf5YTWX6lB

Question

A developer has successfully configured their credentials for Databricks Repos and cloned a remote Git repository. They do not have privileges to make changes to the main branch, which is the only branch currently visible in their workspace.

Which approach allows this user to share their code updates without the risk of overwriting the work of their teammates?

Choices

  • A: Use Repos to create a new branch, commit all changes, and push changes to the remote Git repository.
  • B: Use Repos to create a fork of the remote repository, commit all changes, and make a pull request on the source repository.
  • C: Use Repos to pull changes from the remote Git repository; commit and push changes to a branch that appeared as changes were pulled.
  • D: Use Repos to merge all differences and make a pull request back to the remote repository.

Question ealYjXDtXnbxXgTn81BN

Question

The security team is exploring whether or not the Databricks secrets module can be leveraged for connecting to an external database.

After testing the code with all Python variables being defined with strings, they upload the password to the secrets module and configure the correct permissions for the currently active user. They then modify their code to the following (leaving all other variables unchanged).

//IMG//

Which statement describes what will happen when the above code is executed?

Choices

  • A: The connection to the external table will succeed; the string “REDACTED” will be printed.
  • B: An interactive input box will appear in the notebook; if the right password is provided, the connection will succeed and the encoded password will be saved to DBFS.
  • C: An interactive input box will appear in the notebook; if the right password is provided, the connection will succeed and the password will be printed in plain text.
  • D: The connection to the external table will succeed; the string value of password will be printed in plain text.

Question ag7Vcqvi3My9j2sKwPOy

Question

The data science team has created and logged a production model using MLflow. The model accepts a list of column names and returns a new column of type DOUBLE.

The following code correctly imports the production model, loads the customers table containing the customer_id key column into a DataFrame, and defines the feature columns needed for the model.

//IMG//

Which code block will output a DataFrame with the schema “customer_id LONG, predictions DOUBLE”?

Choices

  • A: df.map(lambda x:model(x[columns])).select(“customer_id, predictions”)
  • B: df.select(“customer_id”, model(*columns).alias(“predictions”))
  • C: model.predict(df, columns)
  • D: df.apply(model, columns).select(“customer_id, predictions”)