Databricks Machine Learning Associate Question 643
Select 4You are tasked with building a real-time fraud detection system using Delta Live Tables (DLT) in Databricks. The system needs to process streaming data from a Kafka topic, apply a machine learning model for inference, and write the results to a Delta table for downstream consumption. Which of the following steps are required to perform streaming inference with Delta Live Tables?
- A
Define the Kafka input stream as a Delta Live Table by using a streaming read.
- B
Register the machine learning model in the Databricks Model Registry.
- C
Use a Python UDF to apply the machine learning model directly within the Delta Live Table pipeline.
- D
Use the
@dlt.viewor@dlt.tabledecorator to define a transformation that applies the model to the streaming data. - E
Write the output of the inference transformation to a Delta table with a streaming write.
Show answer and explanation
Correct answers: A, B, D, E
Explanation
To perform streaming inference with Delta Live Tables, you need to define a streaming source (e.g., a Kafka topic), register the machine learning model in the Databricks Model Registry, and use Delta Live Tables transformations to apply the model to the streaming data. The output should then be written to a Delta table in streaming mode for further use. Python UDFs are not directly supported in Delta Live Tables for this type of inference.
- A. Correct.
This is correct because Delta Live Tables supports defining a streaming input source, such as a Kafka topic, as the first step in a pipeline.
- B. Correct.
This is correct because the model must be registered in the Databricks Model Registry to enable its use in a production pipeline.
- C. Incorrect.
This is incorrect because Delta Live Tables does not directly support Python UDFs for model inference in a pipeline. Instead, the model should be loaded from the Model Registry.
- D. Correct.
This is correct because Delta Live Tables transformations must be defined using decorators like
@dlt.viewor@dlt.table, and this is where the model inference logic is applied. - E. Correct.
This is correct because Delta Live Tables supports streaming writes to Delta tables, which is necessary to make the inference results available for downstream consumption.