Model Scoring Languages in Fabric Notebook

Answer Correct answer: C, D — Spark SQL and PySpark are the two languages that allow you to perform model scoring using the PREDICT function in a Fabric notebook.

You have a Fabric tenant that contains a machine learning model registered in a Fabric workspace. You need to use the model to generate predictions by using the PREDICT function in a Fabric notebook. Which two languages can you use to perform model scoring? Each correct answer presents a complete solution. NOTE: Each correct answer is worth one point.

  1. T-SQL
  2. DAX
  3. Spark SQL Correct Answer
  4. PySpark Correct Answer

Community Votes

CD
100%

100% of anonymous learners picked answer CD. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

This question tests knowledge of supported runtime environments within Fabric Notebooks for machine learning tasks, specifically distinguishing between T-SQL/DAX and Spark-based languages.

In Microsoft Fabric, you can use PySpark and Spark SQL to generate predictions using the PREDICT function. These languages support the necessary DataFrame and Transformer APIs for model scoring.

Candidates often select T-SQL because it supports a PREDICT clause in Azure SQL Database, but this is not available or relevant for the batch scoring context described in Fabric Notebooks using MLFlow/Spark pools.

Community Discussion (16 comments)

mtroyano 👍 18 Selected: CD
Notebook only accepts the languages: PySpark, Spark, Spark SQL and SparkR
Vulkany 👍 1 Selected: CD
Notebook only accepts the languages: PySpark, Spark, Spark SQL and SparkR
NRezgui 👍 1 Selected: CD
PySpark, Spark
shorymor 👍 1 Selected: CD
Notebook only accepts the languages: PySpark, Spark, Spark SQL and SparkR
Rakesh16 👍 1 Selected: CD
Spark SQL and PySpark
jass007_k 👍 1
Its C and D
gtc108 👍 2
https://learn.microsoft.com/en-us/fabric/data-science/tutorial-data-science-batch-scoring ou'll load the test dataset into a spark DataFrame and create an MLFlowTransformer object to generate batch predictions. You can then invoke the PREDICT function using one of following three ways: Transformer API from SynapseML Spark SQL API PySpark user-defined function (UDF)
Gab13 👍 2 Selected: CD
Notebook only accepts the languages: PySpark, Spark, Spark SQL and SparkR
DarioReymago 👍 1 Selected: AD
We can use Predict function with T-SQL: https://learn.microsoft.com/en-us/sql/t-sql/queries/predict-transact-sql?view=sql-server-ver16 But I cannot found the Predict function in Spark SQL. Is different to run a predict process in PySpark
stilferx 👍 1 Selected: CD
IMHO, the answer is C & D. Link is here: https://learn.microsoft.com/en-us/azure/synapse-analytics/machine-learning/tutorial-score-model-predict-spark-pool Here, """You can call PREDICT three ways, using Spark SQL API, using User define function (UDF), and using Transformer API. """. That means, UDF = PySpark in our case.
rmeng 👍 1 Selected: CD
https://learn.microsoft.com/en-us/azure/synapse-analytics/machine-learning/tutorial-score-model-predict-spark-pool
David_Webb 👍 1 Selected: CD
Using Fabric notebook, thus must be C and D.
BrandonPerks 👍 1
The mention of Fabric Notebook, gives the hint to using Spark. Thus I went with CD
Momoanwar 👍 2 Selected: CD
C & d in notebook
wojciech_wie 👍 2
CD - https://learn.microsoft.com/en-us/azure/synapse-analytics/machine-learning/tutorial-score-model-predict-spark-pool
olavrab8 👍 3 Selected: CD
Answer CD Correct T-SQL Cannot be used, nor DAX

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

The correct answers are C (Spark SQL) and D (PySpark). In Microsoft Fabric, machine learning workloads are executed within the OneLake/Spark engine. To perform batch scoring using the PREDICT function, you must interact with the data via Spark DataFrames. This can be done using PySpark (Python API), Spark SQL (SQL syntax on DataFrames), or through SynapseML Transformers. Both PySpark and Spark SQL provide the necessary interface to load datasets, apply ML models (often via MLFlow), and generate predictions.

Why the Other Options Are Wrong

T-SQL (Option A) is used for relational database operations in Azure SQL or Synapse Dedicated SQL Pools. While T-SQL has a PREDICT statement for server-side scoring, it operates on tables/views within the SQL engine, not within a Fabric Notebook's Spark execution context. DAX (Option B) is a formula language used primarily in Power BI and Analysis Services for data analysis and visualization, not for executing machine learning inference code in notebooks.

Community Comment Notes

Community consensus strongly favors CD, citing official Microsoft documentation that lists PySpark, Spark SQL, and SparkR as valid options for notebook-based scoring. Users reference tutorials showing how to load test datasets into Spark DataFrames and create MLFlowTransformers. Some users initially considered T-SQL due to its existence in other Microsoft products but confirmed it is incorrect for this specific notebook scenario.

Official Reference

Exam Strategy

Always identify the execution environment first. If the task involves 'Notebooks' and 'Machine Learning' in Fabric, think Spark (PySpark/Spark SQL). If it involves 'Dashboards' or 'Reports', think DAX. If it involves 'Relational Tables' and 'SQL Queries', think T-SQL.

Frequently Asked Questions

Why can't I use T-SQL for model scoring in Fabric Notebooks?

T-SQL runs in the SQL Pool engine, whereas Fabric Notebooks run in the Spark pool. The PREDICT function in this context refers to Spark-based ML inference, not SQL Server's predictive analytics.

Is R supported for model scoring in Fabric Notebooks?

Yes, SparkR is listed as a supported language alongside PySpark and Spark SQL. However, PySpark is generally preferred due to better ecosystem integration with libraries like MLflow and scikit-learn.

Related Analysis

Practice All DP-600 Questions

Access 115 questions with complete answers and detailed explanations.

View Full DP-600 Practice Test →

← Back to DP-600 Study Guide