DP-500 · Question #135
You have a deep neural network (DNN) machine learning model named Model1 and an Azure Synapse Analytics workspace named Workspace1. You need to score the data in Workspace1 by using Model1 and…
This question tests knowledge of how to operationalize a pre-trained machine learning model inside Azure Synapse Analytics using T-SQL, specifically which built-in function enables in-database scoring and what serialization format the model must be in.
Question
Explanation
This question tests knowledge of how to operationalize a pre-trained machine learning model inside Azure Synapse Analytics using T-SQL, specifically which built-in function enables in-database scoring and what serialization format the model must be in.
Approach. The correct T-SQL function is PREDICT(), which is the native Azure Synapse Analytics (and SQL Server 2017+) function that performs in-database inferencing against a pre-trained ML model without moving data out of the engine. The model (Model1) must be serialized in ONNX (Open Neural Network Exchange) format - Synapse's PREDICT() function accepts ONNX models, allowing framework-agnostic models (from PyTorch, TensorFlow, scikit-learn, etc.) to be stored as a binary in a table and referenced directly in a SELECT statement. The pattern is: store the ONNX binary in a table, then call PREDICT(MODEL = <binary>, DATA = <query>) to return scored results alongside the source data, all within a single T-SQL query.
Concept tested. Azure Synapse Analytics in-database ML scoring: the PREDICT() T-SQL function and the requirement that models be in ONNX format for native SQL-based inferencing.
Reference. https://learn.microsoft.com/en-us/azure/synapse-analytics/sql/predict-tsql
Topics
Community Discussion
No community discussion yet for this question.