πŸ”

DATA-ENGINEER-ASSOCIATE β€” questions

Page 4 of 9 Β· 169 total questions.

Topic 1 Β· Question 61

Which of the following commands will return the number of null values in the member_id column?

  • ASELECT count(member_id) FROM my_table;
  • BSELECT count(member_id) - count_null(member_id) FROM my_table;
  • CSELECT count_if(member_id IS NULL) FROM my_table; (correct answer)
  • DSELECT null(member_id) FROM my_table;
  • ESELECT count_null(member_id) FROM my_table;
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: SELECT count_if(member_id IS NULL) FROM my_table;

Topic 1 Β· Question 62

A data engineer needs to apply custom logic to identify employees with more than 5 years of experience in array column employees in table stores. The custom logic should create a new column exp_employees that is an array of all of the employees with more than 5 years of experience for each row. In order to apply this custom logic at scale, the data engineer wants to use the FILTER higher-order function. Which of the following code blocks successfully completes this task?

  • A (correct answer)
  • B
  • C
  • D
  • E
Reveal answer & explanation
Correct answer: A

The correct answer is A. This option scales automatically to match demand.

Topic 1 Β· Question 63

A data engineer has a Python variable table_name that they would like to use in a SQL query. They want to construct a Python code block that will run the query using table_name. They have the following incomplete code block: ____(f"SELECT customer_id, spend FROM {table_name}") Which of the following can be used to fill in the blank to successfully complete the task?

  • Aspark.delta.sql
  • Bspark.delta.table
  • Cspark.table
  • Ddbutils.sql
  • Espark.sql (correct answer)
Reveal answer & explanation
Correct answer: E

The correct answer is E. Option E: spark.sql

Topic 1 Β· Question 64

A data engineer has created a new database using the following command: CREATE DATABASE IF NOT EXISTS customer360; In which of the following locations will the customer360 database be located?

  • Adbfs:/user/hive/database/customer360
  • Bdbfs:/user/hive/warehouse (correct answer)
  • Cdbfs:/user/hive/customer360
  • DMore information is needed to determine the correct response
  • Edbfs:/user/hive/database
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: dbfs:/user/hive/warehouse

Topic 1 Β· Question 65

A data engineer is attempting to drop a Spark SQL table my_table and runs the following command: DROP TABLE IF EXISTS my_table; After running this command, the engineer notices that the data files and metadata files have been deleted from the file system. Which of the following describes why all of these files were deleted?

  • AThe table was managed (correct answer)
  • BThe table's data was smaller than 10 GB
  • CThe table's data was larger than 10 GB
  • DThe table was external
  • EThe table did not have a location
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: The table was managed

Topic 1 Β· Question 66

A data engineer that is new to using Python needs to create a Python function to add two integers together and return the sum? Which of the following code blocks can the data engineer use to complete this task?

  • A
  • B
  • C
  • D (correct answer)
  • E
Reveal answer & explanation
Correct answer: D

The correct answer is D.

Topic 1 Β· Question 67

In which of the following scenarios should a data engineer use the MERGE INTO command instead of the INSERT INTO command?

  • AWhen the location of the data needs to be changed
  • BWhen the target table is an external table
  • CWhen the source table can be deleted
  • DWhen the target table cannot contain duplicate records (correct answer)
  • EWhen the source is not a Delta table
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: When the target table cannot contain duplicate records

Topic 1 Β· Question 68

A data engineer is working with two tables. Each of these tables is displayed below in its entirety. The data engineer runs the following query to join these tables together: Which of the following will be returned by the above query?

Exhibit 1 for question 68Exhibit 2 for question 68
  • A
  • B
  • C (correct answer)
  • D
  • E
Reveal answer & explanation
Correct answer: C

The correct answer is C.

Topic 1 Β· Question 69

A data engineer needs to create a table in Databricks using data from a CSV file at location /path/to/csv. They run the following command: Which of the following lines of code fills in the above blank to successfully complete the task?

Exhibit 1 for question 69
  • ANone of these lines of code are needed to successfully complete the task
  • BUSING CSV (correct answer)
  • CFROM CSV
  • DUSING DELTA
  • EFROM "path/to/csv"
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: USING CSV

Topic 1 Β· Question 70

A data engineer has configured a Structured Streaming job to read from a table, manipulate the data, and then perform a streaming write into a new table. The code block used by the data engineer is below: If the data engineer only wants the query to process all of the available data in as many batches as required, which of the following lines of code should the data engineer use to fill in the blank?

Exhibit 1 for question 70
  • AprocessingTime(1)
  • Btrigger(availableNow=True) (correct answer)
  • Ctrigger(parallelBatch=True)
  • Dtrigger(processingTime="once")
  • Etrigger(continuous="once")
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: trigger(availableNow=True) This option meets the real-time / low-latency performance requirement.

Topic 1 Β· Question 71

A data engineer has developed a data pipeline to ingest data from a JSON source using Auto Loader, but the engineer has not provided any type inference or schema hints in their pipeline. Upon reviewing the data, the data engineer has noticed that all of the columns in the target table are of the string type despite some of the fields only including float or boolean values. Which of the following describes why Auto Loader inferred all of the columns to be of the string type?

  • AThere was a type mismatch between the specific schema and the inferred schema
  • BJSON data is a text-based format (correct answer)
  • CAuto Loader only works with string data
  • DAll of the fields had at least one null value
  • EAuto Loader cannot infer the schema of ingested data
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: JSON data is a text-based format

Topic 1 Β· Question 72

A Delta Live Table pipeline includes two datasets defined using STREAMING LIVE TABLE. Three datasets are defined against Delta Lake table sources using LIVE TABLE. The table is configured to run in Development mode using the Continuous Pipeline Mode. Assuming previously unprocessed data exists and all definitions are valid, what is the expected outcome after clicking Start to update the pipeline?

  • AAll datasets will be updated once and the pipeline will shut down. The compute resources will be terminated.
  • BAll datasets will be updated at set intervals until the pipeline is shut down. The compute resources will persist until the pipeline is shut down.
  • CAll datasets will be updated once and the pipeline will persist without any processing. The compute resources will persist but go unused.
  • DAll datasets will be updated once and the pipeline will shut down. The compute resources will persist to allow for additional testing.
  • EAll datasets will be updated at set intervals until the pipeline is shut down. The compute resources will persist to allow for additional testing. (correct answer)
Reveal answer & explanation
Correct answer: E

The correct answer is E. Option E: All datasets will be updated at set intervals until the pipeline is shut down. The compute resources will persist to allow for additional testing. This option meets the real-time / low-latency performance requirement.

Topic 1 Β· Question 73

Which of the following data workloads will utilize a Gold table as its source?

  • AA job that enriches data by parsing its timestamps into a human-readable format
  • BA job that aggregates uncleaned data to create standard summary statistics
  • CA job that cleans data by removing malformatted records
  • DA job that queries aggregated data designed to feed into a dashboard (correct answer)
  • EA job that ingests raw data from a streaming source into the Lakehouse
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: A job that queries aggregated data designed to feed into a dashboard

Topic 1 Β· Question 74

Which of the following must be specified when creating a new Delta Live Tables pipeline?

  • AA key-value pair configuration
  • BThe preferred DBU/hour cost
  • CA path to cloud storage location for the written data
  • DA location of a target database for the written data
  • EAt least one notebook library to be executed (correct answer)
Reveal answer & explanation
Correct answer: E

The correct answer is E. Option E: At least one notebook library to be executed

Topic 1 Β· Question 75

A data engineer has joined an existing project and they see the following query in the project repository: CREATE STREAMING LIVE TABLE loyal_customers AS SELECT customer_id - FROM STREAM(LIVE.customers) WHERE loyalty_level = 'high'; Which of the following describes why the STREAM function is included in the query?

  • AThe STREAM function is not needed and will cause an error.
  • BThe table being created is a live table.
  • CThe customers table is a streaming live table. (correct answer)
  • DThe customers table is a reference to a Structured Streaming query on a PySpark DataFrame.
  • EThe data in the customers table has been updated since its last run.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: The customers table is a streaming live table. This option meets the real-time / low-latency performance requirement.

Topic 1 Β· Question 76

Which of the following describes the type of workloads that are always compatible with Auto Loader?

  • AStreaming workloads (correct answer)
  • BMachine learning workloads
  • CServerless workloads
  • DBatch workloads
  • EDashboard workloads
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Streaming workloads

Topic 1 Β· Question 77

A data engineer and data analyst are working together on a data pipeline. The data engineer is working on the raw, bronze, and silver layers of the pipeline using Python, and the data analyst is working on the gold layer of the pipeline using SQL. The raw source of the pipeline is a streaming input. They now want to migrate their pipeline to use Delta Live Tables. Which of the following changes will need to be made to the pipeline when migrating to Delta Live Tables?

  • ANone of these changes will need to be made (correct answer)
  • BThe pipeline will need to stop using the medallion-based multi-hop architecture
  • CThe pipeline will need to be written entirely in SQL
  • DThe pipeline will need to use a batch source in place of a streaming source
  • EThe pipeline will need to be written entirely in Python
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: None of these changes will need to be made This option meets the real-time / low-latency performance requirement.

Topic 1 Β· Question 78

A data engineer is using the following code block as part of a batch ingestion pipeline to read from a composable table: Which of the following changes needs to be made so this code block will work when the transactions table is a stream source?

Exhibit 1 for question 78
  • AReplace predict with a stream-friendly prediction function
  • BReplace schema(schema) with option ("maxFilesPerTrigger", 1)
  • CReplace "transactions" with the path to the location of the Delta table
  • DReplace format("delta") with format("stream")
  • EReplace spark.read with spark.readStream (correct answer)
Reveal answer & explanation
Correct answer: E

The correct answer is E. Option E: Replace spark.read with spark.readStream

Topic 1 Β· Question 79

Which of the following queries is performing a streaming hop from raw data to a Bronze table?

  • A
  • B
  • C
  • D
  • E (correct answer)
Reveal answer & explanation
Correct answer: E

The correct answer is E. This option meets the real-time / low-latency performance requirement.

Topic 1 Β· Question 80

A dataset has been defined using Delta Live Tables and includes an expectations clause: CONSTRAINT valid_timestamp EXPECT (timestamp > '2020-01-01') ON VIOLATION FAIL UPDATE What is the expected behavior when a batch of data containing data that violates these constraints is processed?

  • ARecords that violate the expectation are dropped from the target dataset and recorded as invalid in the event log.
  • BRecords that violate the expectation cause the job to fail. (correct answer)
  • CRecords that violate the expectation are dropped from the target dataset and loaded into a quarantine table.
  • DRecords that violate the expectation are added to the target dataset and recorded as invalid in the event log.
  • ERecords that violate the expectation are added to the target dataset and flagged as invalid in a field added to the target dataset.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Records that violate the expectation cause the job to fail.

Showing questions 61–80 of 169 Β· Page 4 of 9