Skip to content

DP-600 · Domain 4: Explore and analyze data · 22% of the exam

Task 4.1: Perform exploratory analytics

Descriptive and diagnostic analytics, prescriptive and predictive analytics in a visual or report, and profiling data.

Study it

  • Descriptive and diagnostic analytics

    Lesson coming

  • Predictive and prescriptive analytics in a visual or report

    Lesson coming

  • Profiling data in notebooks, SQL and Data Wrangler

    Partly covered by: Data Readiness for AI

Sample questions

Try each one before opening the answer. Every option is explained, with the Microsoft documentation page that proves it.

Question 1 · choose 1

Data scientists are building a churn model in a Fabric notebook. Its features must use the Total Revenue and Net Margin measures exactly as the finance semantic model defines them, by customer and month, and the business rules behind those measures change several times a year. The team works only with pandas DataFrames, not Spark, and doesn't want to copy measure logic. What should they use?

  1. AThe semantic link Spark native connector's _Metrics table with Spark SQL
  2. BA Spark job that recreates the measures as DataFrame aggregations
  3. CAn export of a report visual with both measures to a CSV file in the lakehouse
  4. DSemPy's add_measure on a FabricDataFrame, naming the model's two measures
Show the answer and why
  • AThe semantic link Spark native connector's _Metrics table with Spark SQL

    Incorrect

    The connector does expose measures through _Metrics, but it's for Spark users; add_measure in SemPy is the pandas route.

  • BA Spark job that recreates the measures as DataFrame aggregations

    Incorrect

    Rewriting the logic duplicates the business rules, which then drift whenever finance changes the measures.

  • CAn export of a report visual with both measures to a CSV file in the lakehouse

    Incorrect

    A one-time export goes stale and depends on what the visual shows, not on the model's current definitions.

  • DSemPy's add_measure on a FabricDataFrame, naming the model's two measures

    Correct

    add_measure augments the data with measures computed by the semantic model, so the model's definitions are reused as they change.

Semantic link connects Fabric notebooks to Power BI semantic models so that data scientists don't have to reimplement business logic embedded in measures. In the SemPy Python library, the FabricDataFrame exposes add_measure, which augments data with measures from a semantic model; this operation isn't supported in the Spark native connector, where measures are reached through the virtual _Metrics table instead.

Question 2 · choose 1

A scikit-learn churn model is registered in the workspace with MLflow. Every night, all current customers must be scored, and a Direct Lake report must show each customer's churn probability next to their sales, with no service to host and no code in the report. What should you build?

  1. AA Python visual in the report that loads the model and scores the visible customers
  2. BA T-SQL query with PREDICT in the warehouse, run by a Script activity every night
  3. CA scheduled notebook that scores with PREDICT and writes a Delta table
  4. DA calculated column in the Direct Lake model that applies the trained model's coefficients
Show the answer and why
  • AA Python visual in the report that loads the model and scores the visible customers

    Incorrect

    That puts code in the report, scores only what the visual receives, and runs at view time instead of nightly.

  • BA T-SQL query with PREDICT in the warehouse, run by a Script activity every night

    Incorrect

    PREDICT isn't supported in Fabric Data Warehouse T-SQL; scoring runs in Spark.

  • CA scheduled notebook that scores with PREDICT and writes a Delta table

    Correct

    PREDICT does batch scoring of MLflow models in Fabric, and a Delta table of scores is what a Direct Lake model reads.

  • DA calculated column in the Direct Lake model that applies the trained model's coefficients

    Incorrect

    Calculated columns that reference Direct Lake tables aren't supported on Direct Lake on SQL, and copying coefficients duplicates the model.

Fabric operationalizes machine learning models with the scalable PREDICT function, which performs batch scoring from a notebook or from the ML model's item page. Writing the predictions to a Delta table in OneLake lets Power BI read them through Direct Lake alongside the rest of the model. PREDICT isn't part of the T-SQL surface area of Fabric Data Warehouse.

Question 3 · choose 1

Sales managers want to try discount rates from 0% to 30% in steps of 1% on a report page and see the projected revenue change immediately, without editing the model each time. Which feature should you add?

  1. AA numeric range parameter
  2. BA field parameter that lists the discount rates
  3. CA calculated column on Sales that applies each discount rate
  4. DA calculation group with one item per discount rate
Show the answer and why
  • AA numeric range parameter

    Correct

    A what-if parameter stores the variable, adds a slicer and a value measure, and other measures can use that value.

  • BA field parameter that lists the discount rates

    Incorrect

    Field parameters let readers switch which fields or measures a visual uses, not supply a numeric variable.

  • CA calculated column on Sales that applies each discount rate

    Incorrect

    Calculated columns are computed at refresh, so readers can't change the rate from the report.

  • DA calculation group with one item per discount rate

    Incorrect

    Calculation items hard-code each rate in the model, so any change to the range means editing the model, and the group applies to every measure in the visual instead of supplying one rate to a projection measure.

In Power BI Desktop, a numeric range parameter stores a variable that readers adjust with a slicer. Creating the parameter also creates a measure that returns its current value, and you write other measures, such as projected revenue after discount, that use it. Parameters are designed for measures in visuals and can have at most 1,000 unique values.

Question 4 · choose 1

An analyst opens a 2-million-row Spark DataFrame in Data Wrangler from a notebook to profile it. The Summary panel shows no missing values in the Email column, but a later load fails on null emails. She needs the summary statistics to reflect the whole DataFrame, not a slice of it. What explains the summary, and what should she do?

  1. AShe saw the default 5,000-row sample; she should open a custom sample of all rows
  2. BData Wrangler hides nulls in Spark DataFrames; she should convert the DataFrame to pandas first
  3. CSummary statistics ignore columns of type string; she should cast Email to another type
  4. DThe notebook kernel was busy; she should rerun the cell and reopen Data Wrangler
Show the answer and why
  • AShe saw the default 5,000-row sample; she should open a custom sample of all rows

    Correct

    The default sample is the first 5,000 rows, and Choose custom sample sets the size and sampling method.

  • BData Wrangler hides nulls in Spark DataFrames; she should convert the DataFrame to pandas first

    Incorrect

    Data Wrangler reports missing values for both pandas and Spark DataFrames; the issue is the sample.

  • CSummary statistics ignore columns of type string; she should cast Email to another type

    Incorrect

    Statistics depend on the data type, but missing values are reported for string columns too.

  • DThe notebook kernel was busy; she should rerun the cell and reopen Data Wrangler

    Incorrect

    Data Wrangler can't open while the kernel is busy at all; it opened, so the summary came from the sample.

When Data Wrangler opens a DataFrame, it uses a sample, by default the first 5,000 rows, and its Summary panel shows dimensions, missing values and per-column statistics for that sample. To profile a different part or more of the data, select Choose custom sample and set the number of rows and the method (first records, last records or random). Data Wrangler works with both pandas and Spark DataFrames.

Question 5 · choose 1

In a FabricDataFrame of addresses, each ZIP code should map to exactly one city, but a diagnostic analysis suggests some ZIP codes appear with several cities. You want the ZIP values that break the rule, with the conflicting city values and their counts. Which semantic link function returns this?

  1. Afind_dependencies on the DataFrame, then a filter of its output to the ZIP and CITY columns
  2. Bplot_dependency_metadata on the output of find_dependencies
  3. Clist_dependency_violations(determinant_col="ZIP", dependent_col="CITY")
  4. Dadd_measure with a distinct count of CITY
Show the answer and why
  • Afind_dependencies on the DataFrame, then a filter of its output to the ZIP and CITY columns

    Incorrect

    It discovers which columns depend on which; it doesn't list the violating values.

  • Bplot_dependency_metadata on the output of find_dependencies

    Incorrect

    It visualizes groups of dependent columns, not the rows that break a dependency.

  • Clist_dependency_violations(determinant_col="ZIP", dependent_col="CITY")

    Correct

    It shows the values that violate a functional dependency between two columns, with their occurrence counts.

  • Dadd_measure with a distinct count of CITY

    Incorrect

    It doesn't test dependencies between the DataFrame's columns or list the values that break one.

Semantic link's find_dependencies detects approximate functional dependencies by using a threshold on conditional entropy, and plot_dependency_metadata visualizes them. list_dependency_violations takes a determinant column and a dependent column and shows the values that violate the dependency, with their counts, which helps identify data quality problems such as ZIP codes linked to several cities.

Question 6 · choose 2

A data scientist adds a Python visual to a report to plot a regression of delivery time against distance for each of 400,000 deliveries. In the service, the plot looks thinner than expected and identical deliveries seem to be merged. Each delivery must be plotted. Which two facts explain what she sees? (Choose TWO.)

  1. APython visuals in the service sample 10% of the rows at random
  2. BA Python visual uses at most 150,000 rows, the top rows of the selection
  3. CPython visuals ignore rows with blank values in any field
  4. DFields are grouped like a table visual, so duplicate rows appear only once unless an index field makes them unique
  5. EThe service converts the data to an aggregate table before running the script
Show the answer and why
  • APython visuals in the service sample 10% of the rows at random

    Incorrect

    No random sampling is applied; the limit is the top 150,000 rows.

  • BA Python visual uses at most 150,000 rows, the top rows of the selection

    Correct

    When more than 150,000 rows are selected, only the top 150,000 are used and a message appears on the image.

  • CPython visuals ignore rows with blank values in any field

    Incorrect

    Blank handling isn't what thins the plot here; the row limit and grouping are.

  • DFields are grouped like a table visual, so duplicate rows appear only once unless an index field makes them unique

    Correct

    Adding a unique index field prevents the grouping so that every row reaches the script.

  • EThe service converts the data to an aggregate table before running the script

    Incorrect

    The script receives grouped rows, not an aggregate table built by the service.

The data a Python visual uses for plotting is limited to 150,000 rows; if more are selected, only the top 150,000 are used and a message appears on the image, and the input data also has a 250 MB limit. As in table visuals, fields are grouped and duplicate rows appear once, so add an index field to make all rows unique when you need every row.

Question 7 · choose 1

A data scientist wants to use semantic link in a Fabric notebook that runs on Fabric Runtime 1.3. What must she install first?

  1. AThe semantic-link package with %pip install in every session
  2. BNothing; it's in the default runtime from Runtime 1.2 on
  3. CPower BI Desktop on the Spark cluster
  4. DAn on-premises data gateway for the semantic model
Show the answer and why
  • AThe semantic-link package with %pip install in every session

    Incorrect

    An install is only needed to update to the latest version, not to use it.

  • BNothing; it's in the default runtime from Runtime 1.2 on

    Correct

    For Fabric Runtime 1.2 and above, semantic link is in the default runtime, with no install needed.

  • CPower BI Desktop on the Spark cluster

    Incorrect

    Notebooks reach semantic models through semantic link, not through Desktop.

  • DAn on-premises data gateway for the semantic model

    Incorrect

    Semantic link connects to semantic models from Fabric notebooks without a gateway.

Semantic link connects Power BI semantic models with Data Science in Microsoft Fabric. For Fabric Runtime 1.2 (Spark 3.4) and above, semantic link is available in the default runtime and doesn't need to be installed; %pip install -U semantic-link updates it to the latest version.

Question 8 · choose 1

An analyst profiles a Spark DataFrame in Data Wrangler and wants to add a custom code operation to the cleaning steps. The option isn't offered. Why?

  1. AData Wrangler can't open Spark DataFrames
  2. BCustom code works only on a custom sample, not on the default view
  3. CCustom code needs the notebook to be attached to an environment
  4. DCustom code operations currently support only pandas DataFrames
Show the answer and why
  • AData Wrangler can't open Spark DataFrames

    Incorrect

    Data Wrangler opens both pandas and Spark DataFrames.

  • BCustom code works only on a custom sample, not on the default view

    Incorrect

    How the DataFrame is sampled doesn't decide which operations are offered; its type does.

  • CCustom code needs the notebook to be attached to an environment

    Incorrect

    Environments aren't the reason; the operation type depends on the DataFrame kind.

  • DCustom code operations currently support only pandas DataFrames

    Correct

    Data Wrangler's custom code operations are limited to pandas DataFrames.

Data Wrangler opens pandas or Spark DataFrames from a Fabric notebook, shows summary statistics and offers data-cleaning operations that generate code automatically. One of its current limitations is that custom code operations support only pandas DataFrames.

Question 9 · choose 1

An analyst calls display(df) on a 3-million-row Spark DataFrame in a Fabric notebook and opens the Inspect pane to profile the columns. How many rows does the display widget render by default, and what's the most it can view and profile?

  1. A5,000 by default, and at most 100,000
  2. B10,000 by default, and at most 1 million
  3. C1,000 by default, and at most 10,000
  4. DAll 3 million rows
Show the answer and why
  • A5,000 by default, and at most 100,000

    Incorrect

    The documented default for display is 1,000 rows, and the widget's maximum is 10,000.

  • B10,000 by default, and at most 1 million

    Incorrect

    10,000 is the maximum, not the default.

  • C1,000 by default, and at most 10,000

    Correct

    display renders 1,000 rows by default, and the output widget can view and profile up to 10,000 rows.

  • DAll 3 million rows

    Incorrect

    The display widget doesn't render whole large DataFrames.

The display() function renders Spark DataFrames, pandas DataFrames and SQL results as interactive tables or charts. You can specify the row count to render; the default is 1,000, and the output widget can view and profile at most 10,000 rows. The Inspect pane shows each column's distribution and statistics for the rendered data.

Question 10 · choose 1

You run find_dependencies on a FabricDataFrame and get many weak, approximate dependencies between columns. You want only strong dependencies to be reported. What should you change?

  1. ALower the conditional entropy threshold
  2. BRaise the conditional entropy threshold
  3. CSet dropna=True
  4. DCall plot_dependency_metadata first
Show the answer and why
  • ALower the conditional entropy threshold

    Correct

    A lower threshold makes find_dependencies more selective, so only stronger dependencies are detected.

  • BRaise the conditional entropy threshold

    Incorrect

    A higher threshold lets weaker dependencies through.

  • CSet dropna=True

    Incorrect

    dropna removes rows with NaN values from evaluation; it doesn't make the function stricter.

  • DCall plot_dependency_metadata first

    Incorrect

    That function visualizes dependencies already found; it doesn't change detection.

Semantic link's find_dependencies uses a threshold on conditional entropy to discover approximate functional dependencies, where low conditional entropy indicates strong dependence. To make it more selective, set a lower threshold so that only stronger dependencies are detected. With dropna=True, rows with NaN values in either column are left out of the evaluation.

Practice domain 4 →Practice all domains →