Databricks Machine Learning Associate Question 645
Select 3A data engineering team is designing a real-time machine learning inference pipeline using Delta Live Tables (DLT) in Databricks. They want to process streaming input data, apply a pre-trained model for predictions, and write the results to a Delta table. Which of the following steps are necessary to perform streaming inference using Delta Live Tables?
- A
Define a DLT pipeline with the input data source configured as a streaming source.
- B
Use a Python function with a pre-trained model to apply predictions in a
@dlt.viewor@dlt.tabledecorator. - C
Set the DLT pipeline to 'Triggered' mode to ensure continual processing of the streaming data.
- D
Write the inference results to a Delta table using a
@dlt.tabledecorator. - E
Ensure the pre-trained model is stored in a Databricks-hosted MLflow Model Registry for access during inference.
Show answer and explanation
Correct answers: A, B, D
Explanation
Delta Live Tables support real-time streaming inference by allowing users to define streaming input sources, process the data using Python functions with pre-trained models, and write the results to Delta tables using decorators like @dlt.table. While additional tools like the MLflow Model Registry can enhance the process, they are not strictly necessary for streaming inference in DLT.
- A. Correct.
This is correct. Streaming inference requires a streaming source for real-time data ingestion, which DLT supports by configuring the input data source as a streaming source.
- B. Correct.
This is correct. Applying a pre-trained model for predictions typically involves using a Python function within a
@dlt.viewor@dlt.tabledecorator in the DLT pipeline. - C. Incorrect.
This is incorrect. 'Triggered' mode is not required for streaming inference. DLT supports continuous processing for streaming workloads without needing to set this mode explicitly.
- D. Correct.
This is correct. Writing the inference results to a Delta table is a key step in streaming inference, and DLT facilitates this using a
@dlt.tabledecorator. - E. Incorrect.
This is incorrect. While storing the model in the MLflow Model Registry could be helpful for model management, it is not a mandatory requirement for performing streaming inference in DLT.