Views, functions and stored procedures, enriching data with new columns or tables, star schemas for a lakehouse or warehouse, denormalizing, aggregating, merging and joining, duplicates, missing data and nulls, converting column data types, and filtering.
Study it
Views, functions, stored procedures and new columns or tables
Try each one before opening the answer. Every option is explained, with the Microsoft documentation page that proves it.
Question 1 · choose 1
Analysts want a new LoyaltyTier column on dbo.DimCustomer in a Fabric warehouse, filled from a lookup table. The table has reports and views built on it, so it must keep its name and existing rows. Which approach works in Fabric Data Warehouse?
AALTER TABLE ... ADD LoyaltyTier varchar(20) NULL, then UPDATE it from the lookup table
BALTER TABLE dbo.DimCustomer ADD LoyaltyTier varchar(20) NOT NULL DEFAULT 'None' in one step
CADD a computed column that looks up the tier from the lookup table
DRebuild the table with CREATE TABLE AS SELECT under the same name
Show the answer and why
AALTER TABLE ... ADD LoyaltyTier varchar(20) NULL, then UPDATE it from the lookup table
Correct
Warehouse supports adding nullable columns with ALTER TABLE, and UPDATE can then fill them in place.
BALTER TABLE dbo.DimCustomer ADD LoyaltyTier varchar(20) NOT NULL DEFAULT 'None' in one step
Incorrect
Only nullable columns can be added; other ALTER TABLE operations, such as adding a NOT NULL column with a default, are blocked.
CADD a computed column that looks up the tier from the lookup table
Incorrect
Adding a computed column isn't among the ALTER TABLE operations that Warehouse supports, so the statement is blocked.
DRebuild the table with CREATE TABLE AS SELECT under the same name
Incorrect
CTAS creates a new table, so reusing the name means dropping dbo.DimCustomer first, which breaks the views and reports built on it.
In Fabric Data Warehouse, ALTER TABLE supports only a subset of operations: adding nullable columns of supported data types, dropping columns, and adding or dropping primary key, unique and foreign key constraints with NOT ENFORCED. Other ALTER TABLE operations are blocked. Adding the column as nullable and filling it with UPDATE keeps the table, its rows and the objects that depend on it.
To help report authors, an analyst added foreign key constraints between tables in a lakehouse's SQL analytics endpoint. Since then, new columns that Spark jobs add to the Delta table dbo.Sales don't appear in the endpoint, while new tables still do. What should you do?
ARun OPTIMIZE on dbo.Sales so that the endpoint picks up the new files sooner
BTurn on Delta column mapping by name on dbo.Sales
CRecreate the constraints with NOT ENFORCED
DDrop the foreign key constraints on the table in the SQL analytics endpoint
Show the answer and why
ARun OPTIMIZE on dbo.Sales so that the endpoint picks up the new files sooner
Incorrect
Compaction rewrites the Parquet files but doesn't lift the block that the foreign key places on schema changes.
BTurn on Delta column mapping by name on dbo.Sales
Incorrect
Column mapping doesn't lift the block that a foreign key in the endpoint places on schema changes.
CRecreate the constraints with NOT ENFORCED
Incorrect
Constraints in Fabric are already NOT ENFORCED; the problem is the foreign key itself, not its enforcement.
DDrop the foreign key constraints on the table in the SQL analytics endpoint
Correct
A foreign key added in the endpoint prevents further schema changes, such as new columns, from reaching the table.
The SQL analytics endpoint generates T-SQL tables from the lakehouse's Delta tables and keeps their metadata in sync automatically. If you add a foreign key constraint between tables in the SQL analytics endpoint, you can't make further schema changes, such as adding new columns. When expected Delta columns don't show up, check for a foreign key constraint that might prevent updates on the table.
A Dataflow Gen2 query reads orders from an API and must load them into an existing table in a Fabric warehouse. Publishing fails on the OrderedAt column, whose type in the query is Date/Time/Timezone. Every other column loads. What should you change?
ASwitch the destination to automatic settings so that the mapping adjusts itself
BChange the schema option from fixed schema to dynamic schema
CTurn on staging for the query so the warehouse compute converts the type
DConvert OrderedAt to Date/Time in the query before the destination
Show the answer and why
ASwitch the destination to automatic settings so that the mapping adjusts itself
Incorrect
Automatic settings aren't available for Warehouse destinations, and they wouldn't make an unsupported type loadable.
BChange the schema option from fixed schema to dynamic schema
Incorrect
With a warehouse destination only fixed schema is supported, and the schema option doesn't change which types load.
CTurn on staging for the query so the warehouse compute converts the type
Incorrect
Staging changes where transformations run; the destination still can't store a DateTimeZone column.
DConvert OrderedAt to Date/Time in the query before the destination
Correct
The Fabric Warehouse destination doesn't accept the DateTimeZone type, so the column must reach it as a Date/Time value.
Dataflow Gen2 destinations support different data types. For a Fabric Warehouse destination, DateTimeZone, Duration, Currency, Binary and some others aren't supported, so such columns must be converted in the query, for example DateTimeZone to DateTime. Automatic settings are supported for Lakehouse, Azure SQL Database and Snowflake destinations, and when loading into a warehouse only fixed schema is supported.
DimSalesperson in a Fabric warehouse must report each salesperson's historic sales under the region they belonged to at the time of the sale. Misspelled salesperson names are sometimes corrected in the HR system, and reports should then show only the corrected spelling everywhere. Which two handling rules should the dimension load apply? (Choose TWO.)
ATreat a region change as SCD type 1: overwrite the region on the existing row
BTreat a name correction as SCD type 2 so that both spellings stay available
CTreat a region change as SCD type 2: expire the current row and insert a new version
DTreat a region change as SCD type 3 with a PreviousRegion column on the current row
ETreat a name correction as SCD type 1: overwrite the name on the existing rows
Show the answer and why
ATreat a region change as SCD type 1: overwrite the region on the existing row
Incorrect
Overwriting makes past sales roll up to the new region, as if the salesperson had always been there.
BTreat a name correction as SCD type 2 so that both spellings stay available
Incorrect
A new version would keep the misspelled name on historic rows, which the requirement rules out.
CTreat a region change as SCD type 2: expire the current row and insert a new version
Correct
A type 2 version keeps old sales on the old row, so history stays under the region at the time of the sale.
DTreat a region change as SCD type 3 with a PreviousRegion column on the current row
Incorrect
Type 3 keeps limited history on one row, so older sales can't be linked to the region at the time of each sale.
ETreat a name correction as SCD type 1: overwrite the name on the existing rows
Correct
Type 1 overwrites the attribute because there's no need to keep the misspelling, and it's the type used to correct errors.
SCD type 1 overwrites the existing dimension member and is used for most changing attributes and for correcting errors; it doesn't preserve history. SCD type 2 inserts a new time-based version, which needs a surrogate key, and is reserved for attributes that must keep historical perspective, such as a salesperson's region. A dimension can support both SCD type 1 and type 2 changes. Type 3 tracks limited history with attributes on the same row.
DimCustomer in a warehouse tracks the RiskBand attribute as SCD type 2. RiskBand is recalculated for many customers every week, so the table now holds dozens of versions per customer and analysts struggle to pick the right row. Sales must still be analyzable by the risk band that applied at the time of each sale, and the other customer attributes rarely change. What does dimensional modeling guidance suggest?
ASwitch RiskBand to SCD type 1 so that each customer keeps a single row
BSwitch RiskBand to SCD type 3 with a PreviousRiskBand column on the current row
CKeep SCD type 2 and add a label attribute that names each version of the customer
DStore RiskBand as its own dimension key in the sales fact table instead
Show the answer and why
ASwitch RiskBand to SCD type 1 so that each customer keeps a single row
Incorrect
Overwriting removes the risk band that applied at the time of each sale, which analysts still need.
BSwitch RiskBand to SCD type 3 with a PreviousRiskBand column on the current row
Incorrect
Type 3 keeps only limited history, so sales older than the last change lose their band.
CKeep SCD type 2 and add a label attribute that names each version of the customer
Incorrect
A label makes versions readable but doesn't reduce their number, which is the problem.
DStore RiskBand as its own dimension key in the sales fact table instead
Correct
When a changing attribute produces too many versions, it may be better stored in the fact table as a dimension key.
SCD type 2 inserts a new versioned row for each change and should be reserved for attributes that must preserve history. Too many SCD type 2 changes make a dimension hard to comprehend, and frequent changes can indicate that the attribute might be better stored in the fact table, as a dimension key, than versioned in the dimension. Type 3 keeps limited history with attributes on the same row, and a label attribute describes each member and version.
In a lakehouse star schema, each salesperson can cover one or more sales regions, and each region has several salespeople. DimSalesperson and DimSalesRegion each hold one row per member. Analysts must be able to slice by region and see every salesperson who covers it. How should you model the assignment?
AA bridge table with one row per salesperson and region pair, holding both surrogate keys
BA comma-separated RegionList column on DimSalesperson
COne DimSalesperson row per salesperson and region, sharing the salesperson's surrogate key
DA RegionKey column on DimSalesperson that stores the salesperson's primary region
Show the answer and why
AA bridge table with one row per salesperson and region pair, holding both surrogate keys
Correct
The bridge stores the many-to-many relationship, with a one-to-many relationship from each dimension to it.
BA comma-separated RegionList column on DimSalesperson
Incorrect
A list in one column can't be related to DimSalesRegion, so slicing by region doesn't work.
COne DimSalesperson row per salesperson and region, sharing the salesperson's surrogate key
Incorrect
Duplicate keys break the one side of the relationship to the fact table.
DA RegionKey column on DimSalesperson that stores the salesperson's primary region
Incorrect
It keeps one region per salesperson, so the other regions they cover are lost.
When a dimension attribute must store multiple values, you design a multivalued dimension with a bridge table, which stores a many-to-many relationship between entities. With a salesperson dimension and a sales region dimension, the bridge holds a row for each salesperson and sales region relationship: physically there's a one-to-many relationship from each dimension to the bridge, and logically a many-to-many relationship between salespeople and regions.
You're writing a CREATE TABLE statement for a Fabric warehouse from a SQL Server table definition. Which two column definitions must you change because the warehouse doesn't support their data types for tables? (Choose TWO.)
AQuantity int
BOrderedAt datetime
CAmount decimal(18, 2)
DShipDate date
ECustomerName nvarchar(200)
Show the answer and why
AQuantity int
Incorrect
int is a supported exact numeric type for warehouse tables.
BOrderedAt datetime
Correct
datetime isn't supported for warehouse tables; use datetime2, whose precision is limited to 6 digits for fractions of seconds.
CAmount decimal(18, 2)
Incorrect
decimal is supported, and it's the alternative recommended for money columns.
DShipDate date
Incorrect
date is supported for warehouse tables.
ECustomerName nvarchar(200)
Correct
nchar and nvarchar aren't supported; use char and varchar, which store Unicode in a UTF-8 collation.
Fabric Data Warehouse supports a subset of T-SQL data types for tables. bit, smallint, int, bigint, decimal and numeric, float and real, date, time and datetime2, char, varchar, varbinary and uniqueidentifier are supported. Types such as money, datetime and smalldatetime, datetimeoffset, nchar and nvarchar, text, tinyint and xml aren't, with alternatives such as decimal, datetime2, varchar and smallint.
A new warehouse was created with the workspace's default settings. A cleansing query, WHERE Country = 'germany', finds no rows although the staging table holds thousands of rows with Germany. Several such queries run every night, and the team wants all comparisons in this warehouse to ignore case without rewriting them. What should you do?
AChange the workspace's default Data Warehouse collation to case insensitive
BCreate a new warehouse with the case-insensitive collation and move the tables there
CALTER DATABASE to switch the warehouse to Latin1_General_100_CI_AS_KS_WS_SC_UTF8
DWrap every compared column in UPPER() in the nightly queries
Show the answer and why
AChange the workspace's default Data Warehouse collation to case insensitive
Incorrect
A workspace-level change affects only warehouses created afterwards, not the existing one.
BCreate a new warehouse with the case-insensitive collation and move the tables there
Correct
A warehouse's collation is fixed at creation, so ignoring case everywhere needs a new warehouse created with the CI collation.
CALTER DATABASE to switch the warehouse to Latin1_General_100_CI_AS_KS_WS_SC_UTF8
Incorrect
Once a warehouse or SQL analytics endpoint is created, its collation can't be changed.
DWrap every compared column in UPPER() in the nightly queries
Incorrect
It would work, but every query would have to be rewritten, which the team wants to avoid.
New warehouses and SQL analytics endpoints use the workspace's Data Warehouse default collation, which by default is the case-sensitive Latin1_General_100_BIN2_UTF8. The case-insensitive alternative is Latin1_General_100_CI_AS_KS_WS_SC_UTF8. Changing the workspace setting doesn't affect existing items, and a warehouse's collation can't be changed after it's created; create a new warehouse with the collation you need, from the workspace setting or with the REST API.
A Direct Lake on SQL semantic model reads DimDate and the fact tables of a warehouse. Report authors want slicers for the current month, the previous month and the last three months that move forward on their own each day, by filtering on a month offset (0 for the current month, -1 for the previous one). Every table must stay a Direct Lake table. How should you provide the offset?
AA RelativeMonthOffset column in DimDate that the daily ETL refreshes
BA DAX calculated column on the model's Date table that uses TODAY()
CA RelativeMonthOffset column computed once when DimDate is generated
DA RelativeMonthOffset column on each fact row, set when the row loads
Show the answer and why
AA RelativeMonthOffset column in DimDate that the daily ETL refreshes
Correct
Relative offset attributes belong in the date dimension, and the ETL must run daily to update them based on the current date.
BA DAX calculated column on the model's Date table that uses TODAY()
Incorrect
Direct Lake on SQL doesn't support calculated columns that reference Direct Lake tables, so the column would have to be prepared upstream.
CA RelativeMonthOffset column computed once when DimDate is generated
Incorrect
Offsets are relative to today, so values computed once go stale; the ETL has to update them every day.
DA RelativeMonthOffset column on each fact row, set when the row loads
Incorrect
A value stored at load time goes stale for older rows, and period attributes belong in the date dimension, not in the facts.
A date dimension can include relative offset attributes, such as RelativeMonthOffset, to support relative date filtering: current periods use 0, previous periods -1, -2 and so on. When the dimension includes them, the ETL process must run daily to update the offset values based on the current date. For a Direct Lake model, include every column needed for filtering and grouping as a dimension attribute, because calculated columns that reference Direct Lake tables aren't supported in Direct Lake on SQL models.
A silver Delta table holds 5 billion order lines that Spark jobs, the SQL analytics endpoint and a Direct Lake model all read. Architects are deciding when a second physical table derived from it is justified under Fabric guidance. Which two situations justify one? (Choose TWO.)
AAn executive dashboard needs revenue aggregated by month and product category
BThree Fabric engines read the same order lines
CA partner extract may hold only five years of rows and must leave out two confidential columns
DThe Direct Lake model reads the table while Spark jobs write it
EData scientists prefer to query the table from notebooks rather than through SQL
Show the answer and why
AAn executive dashboard needs revenue aggregated by month and product category
Correct
An aggregation that changes the data's grain or business meaning is an independent purpose for another table.
BThree Fabric engines read the same order lines
Incorrect
Several engines reading the data isn't a reason by itself; one shared table should serve compatible consumers.
CA partner extract may hold only five years of rows and must leave out two confidential columns
Correct
Different retention and security requirements are reasons the shared table can't serve that use.
DThe Direct Lake model reads the table while Spark jobs write it
Incorrect
Readers and writers on different engines share Delta tables; that alone doesn't call for a copy.
EData scientists prefer to query the table from notebooks rather than through SQL
Incorrect
A preference for another engine over the same data doesn't justify duplicating it.
Fabric guidance is to use one shared Delta table whenever consumers' requirements are compatible, and not to create another physical table solely because multiple engines read the data. Another table is justified when it has an independent purpose, such as a transformation or aggregation that changes the grain or business meaning, different security, retention or quality requirements, or a latency the shared table can't meet.
A pipeline Copy activity loads a vendor's CSV files from a lakehouse's Files folder into a warehouse table. The vendor writes N/A wherever a value is missing, and the load fails on the numeric Quantity column. Missing values must arrive as NULL, and every row must still load. What should you set?
AThe escape character in the source format, set to N/A
BA string type for Quantity in the destination mapping
CMultiline rows in the source format, turned off
DThe Null value setting of the source format, as N/A
Show the answer and why
AThe escape character in the source format, set to N/A
Incorrect
The escape character escapes quotes inside quoted values; it doesn't decide which text counts as a missing value.
BA string type for Quantity in the destination mapping
Incorrect
The rows would load, but N/A would stay as text instead of arriving as NULL in a numeric column.
CMultiline rows in the source format, turned off
Incorrect
That setting is about rows that span several lines and read performance, not about how null values are written in the file.
DThe Null value setting of the source format, as N/A
Correct
Null value specifies the string that represents null in the file; its default is an empty string.
For delimited text in a pipeline, the source format settings describe how to read the file: column and row delimiters, the quote and escape characters, whether the first row is a header, whether rows can span several lines, and the Null value, the string representation of a null value, which is an empty string by default. Setting it to the vendor's marker makes those cells arrive as NULL, so a numeric destination column can take them.
A warehouse table stores a uniqueidentifier column, CustomerGuid. Analysts can read it in the warehouse, but a join on CustomerGuid between the warehouse and a lakehouse's SQL analytics endpoint doesn't work. What explains this?
AThe endpoint converts the values to varchar(36) strings, which don't match
BCross-database joins aren't supported between a warehouse and an endpoint
CIt's stored as binary in Delta Parquet and can't be read on the endpoint
DThe two items use different collations
Show the answer and why
AThe endpoint converts the values to varchar(36) strings, which don't match
Incorrect
No such conversion happens: with no matching Delta Parquet type, the values are stored as binary, which the endpoint can't read.
BCross-database joins aren't supported between a warehouse and an endpoint
Incorrect
Cross-database queries between a warehouse and an endpoint are supported; the failure comes from this column's type.
CIt's stored as binary in Delta Parquet and can't be read on the endpoint
Correct
Delta Parquet has no matching type, so the endpoint sees binary values and joins on the column fail.
DThe two items use different collations
Incorrect
Collation affects character comparisons, not a uniqueidentifier column's storage.
The uniqueidentifier type has no matching type in Delta Parquet, so it's stored as a binary type. Warehouse supports storing and reading uniqueidentifier columns, but the values can't be read on the SQL analytics endpoint, and reading them in a lakehouse shows a binary representation. Features such as cross-joins between Warehouse and the SQL analytics endpoint on such a column don't work as expected.
A Spark job writes a Delta table with a STRING column Notes to a lakehouse. Which data type does the column get in the lakehouse's SQL analytics endpoint?
Anvarchar(max)
Bvarchar(4000)
Cvarchar(max)
Dvarchar(8000)
Show the answer and why
Anvarchar(max)
Incorrect
The endpoint maps Delta strings to varchar with a UTF-8 collation, not to nvarchar.
Bvarchar(4000)
Incorrect
varchar(4*n) is the mapping for VARCHAR(n) columns shorter than 2,000 characters; STRING columns get varchar(8000).
Cvarchar(max)
Incorrect
varchar(max) is used for STRING in endpoints of mirrored items, not of a lakehouse.
Dvarchar(8000)
Correct
STRING maps to varchar(8000) in the SQL analytics endpoint of a lakehouse, with a UTF-8 BIN2 collation.
The SQL analytics endpoint generates its table columns from the Delta types. STRING and VARCHAR(n) with n of 2000 or more become varchar(8000) in the SQL analytics endpoint of a lakehouse and varchar(max) in the endpoint of mirrored items, while shorter VARCHAR(n) columns become varchar(4*n), all with the Latin1_General_100_BIN2_UTF8 collation.
A cleansing query in a Fabric warehouse converts a staging column of text amounts to decimal. A few rows hold values such as 'n/a', and the query must return NULL for them instead of failing. Which function fits?
ACAST(Amount AS decimal(18, 2))
BTRY_CAST(Amount AS decimal(18, 2))
CCONVERT(decimal(18, 2), Amount)
DISNULL(Amount, 0)
Show the answer and why
ACAST(Amount AS decimal(18, 2))
Incorrect
CAST raises an error when a value can't be converted, so the query fails.
BTRY_CAST(Amount AS decimal(18, 2))
Correct
TRY_CAST returns the converted value when it succeeds and NULL when the conversion fails.
CCONVERT(decimal(18, 2), Amount)
Incorrect
CONVERT also raises an error on values that can't be converted.
DISNULL(Amount, 0)
Incorrect
ISNULL replaces NULLs; it doesn't convert text or handle 'n/a'.
TRY_CAST tries to convert a value to the specified data type and returns it if the cast succeeds; if an error occurs, it returns NULL. A conversion that's explicitly not permitted still fails with an error. TRY_CAST is available in the Fabric warehouse and the SQL analytics endpoint, which makes it useful for cleansing values that might not convert.
A warehouse table will store long JSON documents in a varchar(max) column. What's the storage limit for one value in that column?
A16 MB
B8 KB
C2 GB
D1 MB
Show the answer and why
A16 MB
Correct
The limit for storage in varchar(max) is currently 16 MB in Fabric Data Warehouse.
B8 KB
Incorrect
8,000 characters is the limit of varchar(8000), not varchar(max).
C2 GB
Incorrect
The documented limit for varchar(max) in Fabric Data Warehouse is 16 MB, far below 2 GB.
D1 MB
Incorrect
The documented limit is 16 MB.
Fabric Data Warehouse supports varchar and varbinary, and the limit for storage in varchar(max) and varbinary(max) is currently 16 MB. There's no json type for tables; use varchar instead.
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?
AShe saw the default 5,000-row sample; she should open a custom sample of all rows
BData Wrangler hides nulls in Spark DataFrames; she should convert the DataFrame to pandas first
CSummary statistics ignore columns of type string; she should cast Email to another type
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.