Which Languages Support PREDICT Function in 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.
Community Insight
The PREDICT function in a Fabric notebook is strictly supported by Spark SQL and PySpark, trapping users who mistakenly assume T-SQL or DAX can be used for Spark-based ML scoring.
Microsoft Fabric notebooks support the PREDICT function for machine learning model scoring using specific Spark-based languages. This page establishes that Spark SQL and PySpark are the correct options for generating predictions.
Choosing T-SQL because it is a prominent query language in Fabric, but it cannot be used in Spark notebooks for the PREDICT function.
Community Discussion (21 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
The PREDICT function in a Microsoft Fabric notebook allows users to score registered machine learning models and generate predictions. According to official documentation, model scoring with PREDICT in a notebook is supported via the Spark SQL API and the PySpark user-defined function (UDF). These Spark-based languages are natively integrated with the underlying Spark compute of the notebook, enabling seamless batch scoring operations.Why the Other Options Are Wrong
T-SQL is used in Fabric data warehouses and Lakehouse SQL analytics endpoints, not in Spark notebooks for ML model scoring. DAX is an analytical query language used exclusively for Power BI semantic models and has no capability to invoke machine learning models or the PREDICT function in a notebook environment.Community Comment Notes
Community members strongly agree that notebooks only accept Spark-based languages for this task. As gtc108 pointed out by referencing the official documentation, you can invoke the PREDICT function using the "Spark SQL API PySpark user-defined function". Others, like mtroyano, noted that a "Notebook only accepts the languages: PySpark, Spark, Spark SQL and SparkR", effectively ruling out T-SQL and DAX.Official Reference
Exam Strategy
When asked about notebook languages in Fabric, remember that notebooks run on Spark compute. Therefore, only Spark-based languages like PySpark and Spark SQL are valid for ML scoring, whereas T-SQL and DAX are reserved for warehouses and semantic models.
Related Analysis
Practice All DP-600 Questions
Access 115 questions with complete answers and detailed explanations.
View Full DP-600 Practice Test →