QuestionQ123

Implement and manage semantic models

HOTSPOT

You have a Fabric tenant that contains a warehouse named WH1.

You run the following T-SQL query against WH1.

Question Image

For each statement below, select Yes when it is true. Otherwise, select No.

Yes or No
StatementsYesNo
Dimension.GetDirectReports is a scalar T-SQL function.
The Dimension.GetDirectReports function will run only once when the query runs.
The output rows will include at least one row for each row in the Dimension.Employee table.
Explanation

Dimension.GetDirectReports is used as a row source with APPLY, so it is a table-valued function, not a scalar function. Its argument comes from each current employee row, making the APPLY correlation per outer row rather than a single query-wide function execution. OUTER APPLY retains every left-side employee row; when no direct-report rows are returned, the gdr columns are NULL, preserving at least one output row for that employee.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!