DP-600 Cheatsheet
Implementing Analytics Solutions Using Microsoft Fabric
Download free PDFMaintain a data analytics solution (25–30%)
Capacity, workspaces and domains
- **Fabric capacity** supplies shared compute; a **workspace** contains analytics items. Assign workspaces to a capacity that supports the required workloads. **PPU** is a per-user Power BI license, not a Fabric capacity.
- **F SKUs** provide Azure-purchased Fabric capacity with scale, pause and resume controls. Scope tenant settings for Fabric item creation and trials to approved security groups when running a limited proof of concept.
- **Domains and subdomains** organize workspaces by business ownership and improve catalog discovery. They do not replace workspace or item permissions. Fabric administrators create domains; domain administrators manage their assigned domain.
- **Workspace identity** is a managed identity for supported connections. Grant it the required permissions on external storage; assigning users a workspace role does not grant that identity access to Azure resources.
Workspace and item permissions
- **Admin** manages workspace settings and access. **Member** can collaborate and manage permitted memberships. **Contributor** creates and edits content. **Viewer** consumes content; use groups to simplify assignments.
- **Item sharing** grants access to a specific item. Use it when access to an entire workspace would be excessive. Separate **Read**, **Write**, **Reshare** and semantic-model **Build** permissions according to the task.
- **ReadData** grants broad SQL data access; **ReadAll** grants broad OneLake/Spark access. Basic item Read permits discovery and connection but does not by itself authorize reading every table or file.
- For access to one warehouse table, grant item access and a narrow **SQL SELECT** permission. Avoid broad workspace roles or db_datareader. **TRUNCATE TABLE** requires ALTER permission; scope schema grants only to the intended boundary.
- **Build** allows authors to create reports from a shared semantic model. Access to a report, its semantic model, the SQL endpoint and OneLake files are separate authorization decisions.
Data security and governance
- **SQL RLS** filters warehouse rows with a predicate function and a **security policy**. **Column permissions** restrict selected fields. Scope GRANT, DENY and REVOKE to the required objects and principals.
- **Semantic-model RLS** filters rows through roles and relationships. **OLS** hides tables or columns from authorized queries. Hiding a field in Model view improves usability but is not a security boundary.
- **Dynamic RLS** commonly maps USERPRINCIPALNAME() to a user-to-entity table. USEROBJECTID() returns an object identifier. Test both role logic and the actual user's identity with **Test as role**.
- RLS protects consumers with read access; workspace **Admin, Member and Contributor** roles have elevated model access. Avoid granting editing roles to users who must be restricted by RLS.
- **Dynamic data masking** obscures returned values for unprivileged SQL users; it does not replace access control. SQL security does not automatically secure a separate Spark or direct-file access path.
- **Sensitivity labels** classify content and support protection and DLP policies. **Endorsement** communicates trust, while discovery makes items easier to find. Labels, endorsements and domains do not grant access.
Git and reusable Power BI assets
- **Git integration** connects a workspace to a repository, branch and folder. Use branching, commits, review and synchronization for supported item definitions; Git does not version all operational data or credentials.
- **PBIP** stores a Power BI project as editable definition files and folders. **TMDL** describes the tabular model in text, supporting readable diffs and bulk metadata changes. **PBIR** describes report definitions and model references.
- Keep **cache.abf**, local settings and secrets out of source control. Configure repository credentials and the required tenant Git settings; a workspace role does not automatically grant repository access.
- **PBIX** packages a report and model. **PBIT** preserves queries, parameters, layout and model definitions without imported data. **PBIDS** stores connection details for starting a report, without its model or visual design.
Deployment and dependency management
- **Deployment pipelines** promote supported definitions through development, test and production stages. Pair corresponding items, compare changes and select the intended deployment scope.
- **Pipeline access** and **workspace access** are separate. Give developers deployment rights and appropriate development/test workspace roles; retain the production permission boundary for controlled releases.
- **Deployment rules** substitute supported data sources or parameters in a target stage. Parameterize environment-specific paths and validate connection credentials and refresh behavior after deployment.
- **Lineage and impact analysis** identify downstream reports, models and data preparation dependencies. Deploy compatible dependencies together and validate bindings; source control synchronization alone does not promote a release to production.
- Deployment is not a bulk copy of source data. Plan initial loading, refresh and validation in the target environment, and preserve report availability when changing or processing a production model.
XMLA and operational diagnostics
- **XMLA endpoints** expose supported semantic models to tools such as SSMS, Tabular Editor and DAX Studio. Use an eligible workspace license mode; external writes require the capacity's XMLA endpoint to allow **Read Write** and sufficient model permissions.
- An XMLA workspace address follows **powerbi://api.powerbi.com/v1.0/<tenant>/<workspace>**. Select the model as the catalog; external users must authenticate in the tenant that hosts the workspace.
- **TOM/TMSL** automate model metadata, partitions and processing. Use supported application identities, tenant settings and capacity licensing for unattended operations; keep credentials outside model definitions.
- **Capacity Metrics** helps identify saturation, throttling and workload consumption. **Monitoring hub** tracks item runs. For a blocked SQL query, inspect **sys.dm_exec_requests**, including wait and blocking information, rather than only connection counts.
Prepare data (45–50%)
Select the data store
- **Lakehouse** combines files and Delta tables with Spark processing and a SQL analytics endpoint. It suits mixed structured, semi-structured and unstructured data; transform raw files into tables for relational consumption.
- **Warehouse** suits relational analytics authored with T-SQL, including table writes, stored procedures, multi-table transactions and SQL security. Its underlying storage is in OneLake.
- A lakehouse **SQL analytics endpoint** reads supported Delta tables and supports SQL objects such as views. It does not provide warehouse-style INSERT, UPDATE or DELETE against lakehouse tables; use Spark or ingestion tools for those writes.
- **Eventhouse/KQL databases** serve high-volume events, telemetry and time-series exploration. **OneLake catalog** discovers governed data assets; **Real-Time hub** discovers and manages streaming data sources.
- **Bronze** retains ingested raw data; **Silver** cleanses, deduplicates and standardizes; **Gold** exposes business-ready dimensions and facts. Centralize shared business rules upstream so SQL and BI consumers use the same definitions.
OneLake paths, shortcuts and interoperability
- **Shortcuts** reference supported internal or external storage without an independent ingestion copy. They retain a dependency on the target's availability and permissions; they do not convert CSV files into Delta tables.
- Use a shortcut under **Tables** for compatible Delta table data that must appear as a table and be queried through the SQL endpoint. Use **Files** for general file access. Arbitrary Spark external tables are not automatically SQL endpoint tables.
- For **ADLS Gen2**, ABFS paths use **abfss://<container>@<account>.dfs.core.windows.net/<path>**. For S3 access-key authentication, use the **access key ID** and **secret access key** through a secured connection.
- A notebook attached to the appropriate default lakehouse can read a Delta path with **spark.read.format("delta").load("Tables/<table>")** or query a registered table with **spark.table(...)**. Use the actual schema and copied ABFS path for other lakehouses.
- **OneLake integration** exports supported Import-model tables to Delta after refresh on an eligible capacity; it is not supported by PPU alone. Eventhouse OneLake availability exposes supported KQL data in Delta form for other Fabric engines.
Ingestion and orchestration
- **Dataflow Gen2** provides Power Query transformations and managed destinations. **Copy activity/copy jobs** move data with little code. **Notebooks** handle custom Spark processing; choose the simplest tool that supports the source and required transformation.
- Use an **on-premises data gateway** for supported dataflow connections to local or private sources. Configure the connection, authentication and network path before scheduling refreshes.
- **Append** adds rows; **Overwrite** replaces destination data. Schema replacement and schema evolution are separate choices: confirm destination behavior when columns or partitioning change.
- **Pipeline dependencies** enforce Bronze → Silver → Gold order. **Upon Success** waits for success; **Upon Completion** allows the next step after either success or failure. Use explicit failure handling for recovery.
- **Lookup** returns query or stored-procedure results for downstream expressions. A procedure-execution activity and a result-producing lookup serve different purposes. Use **Get Metadata** to inspect files, folders or object properties.
- **Schedules** combine recurrence, time zone, days and execution times. A watermark records the last successful boundary; advance it after a successful load and account for late arrivals, updates and deletes.
Power Query profiling and transformations
- **Column quality** shows valid, error and empty values. **Distribution** shows distinct and unique values; unique means occurring once. **Column profile** adds statistics and value details. Check whether profiling covers a sample or the entire dataset.
- **Table.Profile** returns per-column statistics such as count, null count, distinct count, min, max, average and standard deviation where applicable. **Table.Max** returns a maximum row; **Table.MaxN** returns multiple rows.
- **Merge** joins tables by keys; **Append** stacks rows. Inner returns matches, left outer preserves the left table, full outer preserves both, and anti joins return rows without a match. A join does not inherently remove duplicates.
- **Unpivot other columns** retains selected identifiers and converts remaining columns into attribute-value rows. **Group by** aggregates at a chosen grain. **Duration.Days([ShipDate] - [OrderDate])** extracts whole days from a date difference.
- **Fuzzy merge** matches text approximately using configured thresholds and options such as combining text parts. For exact business rules, normalize case, whitespace and types before joining; inspect unmatched and ambiguous results.
Folding and reliable cleansing
- **Query folding** pushes supported transformations to the source engine. Filter early and remove unnecessary columns before steps that break folding. Inspect query plans or folding indicators rather than assuming every step folds.
- **Value.NativeQuery** can preserve downstream folding for supported connectors with **[EnableFolding=true]**. Folding depends on the connector and query shape; CSV files do not provide a relational engine to execute pushed-down predicates.
- To retain the latest row per key, use a deterministic timestamp and tie-breaker. Power Query sort followed by remove-duplicates does not guarantee which row survives optimization; use a supported grouped or source-side ranking pattern.
- Standardize **nulls, errors, types and duplicates** before loading dimensions. Keep natural keys stable, validate foreign keys and distinguish a missing value from zero or an empty string.
Spark DataFrames and table writes
- Read files with the matching **csv, parquet or delta** reader. Use an explicit schema when inference could misinterpret values. **withColumn("Age", col("Age").cast("int"))** changes one field while retaining the other columns.
- **to_date(col("Timestamp"))** extracts a date; **year(col("Timestamp"))** derives a year. Combine PySpark predicates with **&** and parenthesized expressions, such as **(col("Fare") > 0) & (col("Fare") < 100)**.
- **df.write.format("delta").saveAsTable("Sales")** registers a Delta table in the attached lakehouse. Writing Parquet to **Files/...** creates files, not a registered managed Delta table.
- **mode("append")** retains existing rows. Enable **mergeSchema** for compatible additive Delta schema evolution; use **overwriteSchema** with overwrite when deliberately replacing the schema. Validate types and nullability before either operation.
- **partitionBy("year", "month")** creates physical partition directories. Choose useful, reasonably sized partitions; high-cardinality keys or excessively fine date partitions create small files and metadata overhead.
Delta maintenance and Spark efficiency
- **Delta Lake** combines Parquet data files with a transaction log for ACID table operations, schema enforcement and version history. Manipulate the table through Delta-aware tools rather than deleting its files manually.
- **OPTIMIZE** compacts small files into larger files. **V-Order** optimizes Parquet layout and compression for analytical reads. Configure maintenance and target file sizing deliberately rather than relying on historical runtime defaults.
- **VACUUM** removes unreferenced files older than its retention threshold. Choose retention that protects required time travel and concurrent readers; compaction and obsolete-file cleanup are different operations.
- **DESCRIBE HISTORY** shows table commits and operations. **DESCRIBE DETAIL** shows current properties and file statistics. **REFRESH TABLE** refreshes cached metadata; **EXPLAIN** describes a query plan.
- **Broadcast joins** send a small lookup DataFrame to executors, reducing a large-table shuffle. Select only needed columns, filter early and avoid collecting large distributed results into driver memory.
Dimensional tables and changing attributes
- Define the **fact grain** first, such as one row per order line. Facts contain measures and dimension keys; **dimensions** contain descriptive attributes. Keep product names and colors in the product dimension, and transaction quantities in the fact.
- A **natural key** identifies an entity in the source. A **surrogate key** identifies a dimension row or version. Denormalize descriptive lookup tables when building a dimension while preserving one row per intended key.
- **SCD Type 1** overwrites changed attributes and inserts new entities. **SCD Type 2** expires the old version and inserts a new surrogate-key row, using effective start/end dates and optionally an IsCurrent flag.
- Match each historical fact to the dimension version valid at its event time. An SCD2 load must preserve prior versions; truncating and reloading a dimension with new keys can break historical relationships.
- A **date dimension** needs unique contiguous dates and useful calendar/fiscal attributes. Generate its required date range rather than copying nonexistent source data, and extend it as new reporting periods arrive.
T-SQL selection, joins and aggregation
- **WHERE** filters rows before aggregation; **GROUP BY** defines the result grain; **HAVING** filters aggregated groups. Use half-open date ranges, such as **Date >= '20230101' AND Date < '20240101'**, to include all times in a year.
- Calculate line revenue with **SUM(Quantity * UnitPrice)**. Use **COUNT(DISTINCT Key)** for distinct entities and **AVG** at the intended grain; a one-to-many join can multiply facts and inflate totals.
- **LEFT JOIN** preserves unmatched left-side rows. A right-side filter in WHERE can remove those rows; place matching restrictions in ON when preservation is required. Join through the full relationship path using compatible key types.
- **ROW_NUMBER() OVER (PARTITION BY CustomerID ORDER BY UpdatedAt DESC, TieBreaker DESC)** ranks versions. Filter the ranked subquery to row 1 for the latest record; use **GROUP BY Email HAVING COUNT(*) > 1** to find duplicate emails.
- **SUM(Quantity) OVER (PARTITION BY OrderID)** provides an order total alongside each line. Use a decimal cast and **NULLIF(total, 0)** for safe proportions. Window functions retain detail rows while grouped aggregates collapse them.
T-SQL objects and efficient persistence
- **CASE** applies conditional classifications in order; define boundary conditions explicitly. **TRY_CAST/TRY_CONVERT** return NULL for supported conversions that fail. **LEN** tests text length; **CONVERT** date styles provide specified display formats.
- **Views** centralize reusable query logic without persisting query results. **Stored procedures** encapsulate executable SQL; functions return supported scalar or tabular results. Pick an object supported by the target SQL engine.
- **CTAS** creates and populates a table from a query, deriving result columns from its expressions. Use explicit casts when exact output types matter. **INSERT INTO ... SELECT** loads an existing table.
- **CREATE TABLE ... AS CLONE OF** makes a warehouse table clone by sharing underlying storage initially. It creates an independent table state with minimal initial data copying; it does not evaluate a join like CTAS.
- Supported **cross-database queries** use three-part names for warehouse and SQL endpoint tables. For cross-workspace lakehouse access without duplicating data, expose the required Delta table through a governed shortcut.
- **TOP** limits result count; combine it with **ORDER BY** for a meaningful top-N result. **RANK/DENSE_RANK** define tie behavior. **ROLLUP/GROUPING SETS** add subtotals, while window aggregates repeat totals beside detail rows.
KQL, notebooks and analytical exploration
- A **KQL** pipeline applies operators left to right: **where** filters, **project** selects or renames, **extend** derives columns, and **summarize** aggregates by grouping keys. Use **order by** and **take/top** to control returned rows.
- **bin(Timestamp, 1h)** creates hourly time buckets. **summarize min(Timestamp) by Category, bin(Timestamp, 1h)** finds the earliest observed event per category and hour; the bucket boundary and earliest event need not be identical.
- Use **parse_json** and typed extraction for dynamic JSON fields. KQL series functions support time-series analysis and anomalies; streaming **eventstream** transformations perform supported aggregations over event windows before storage.
- **display(df)** enables interactive notebook tables and charts. **show()** prints rows; **describe()/summary()** return descriptive statistics; **explain()** returns an execution plan. Spark distributes work; pandas generally uses driver memory.
- **Descriptive** analysis summarizes observations; **diagnostic** explores possible reasons; **predictive** estimates future outcomes; **prescriptive** recommends actions. Registered models can be scored through supported **PREDICT** paths in PySpark or Spark SQL.
- **Python visuals** receive grouped input rows; include a unique row identifier when duplicates must remain distinct. Keep SAS tokens and other secrets in secure connection or secret-management facilities rather than notebook source cells.
Implement and manage semantic models (25–30%)
Relationships and model usability
- A **star schema** normally relates each dimension's unique key to many fact rows, with filters flowing from dimensions to facts. Validate uniqueness on the one side and avoid ambiguous bidirectional filter paths.
- **Bridge tables** represent many-to-many associations, such as customers sharing accounts or products participating in multiple campaigns. Define the bridge grain and filter propagation explicitly to avoid double counting.
- Keep an alternate **ShipDate** relationship inactive when OrderDate must remain the default. Activate it for a measure with **CALCULATE([Sales], USERELATIONSHIP(Fact[ShipDate], 'Date'[Date]))**.
- Use **Model view layouts** to focus on a fact table and related dimensions. Hide technical keys, set their default summarization to **None**, and sort month labels by a numeric month or fiscal sequence column.
- Semantic models are **independent items**. Select and maintain their table membership explicitly; creating a lakehouse or warehouse does not automatically create a synchronized default model.
Storage modes and source security
- **Import** stores compressed data in VertiPaq, offering fast cached queries and broad modeling flexibility. Source changes become visible after refresh; imported copies require their own model security.
- **DirectQuery** sends queries to the source and reflects its data without a full import refresh. It depends on source latency and concurrency. **SSO** passes the user's identity when supported; a fixed connection identity uses its own source permissions.
- **Dual** lets supported dimension tables act as Import or DirectQuery according to the query. **Composite models** combine modes; a hybrid fact can combine imported historical partitions with a real-time DirectQuery partition.
- **Direct Lake** reads Delta data into the VertiPaq engine without a conventional import. Prepare business logic in source tables and evaluate capacity limits, security and supported calculations before choosing it.
Direct Lake behavior and freshness
- **Direct Lake on SQL** uses a SQL analytics endpoint for discovery and permission checks. SQL views or SQL RLS can trigger **DirectQuery fallback**; source identity affects which source security rules apply.
- **DirectLakeBehavior** controls fallback for Direct Lake on SQL. **Automatic** allows it; **DirectLakeOnly** prevents fallback and returns an error when a query cannot run in Direct Lake. Forcing this setting does not remove capacity limits.
- **Direct Lake on OneLake** can use Delta tables across multiple supported items and does not fall back through the SQL endpoint. Plan its OneLake and semantic-model permissions separately from SQL endpoint security.
- **Framing/refresh** updates the model's view of Delta table versions; columns load into memory as needed. Coordinate source commits, automatic updates or explicit refresh, and report caching when diagnosing stale results.
DAX context, measures and queries
- **Measures** evaluate in filter context at query time; **calculated columns** are stored per row. Use measures for aggregations when stored row-level results are unnecessary. **SUMX** evaluates an expression for each row of a table.
- **CALCULATE** changes filter context and performs context transition. Prefer simple column predicates over iterating a whole fact table when possible; **KEEPFILTERS** intersects an added condition with existing filters.
- **REMOVEFILTERS/ALL** clear selected filters for denominators. **DIVIDE([Part], [Total])** safely handles a zero denominator. Clear only the required dimension filters so a percentage preserves its intended scope.
- **RELATED** retrieves a related one-side value; **RELATEDTABLE** returns related rows. **ISEMPTY** tests table emptiness. An existence test asks whether related rows exist rather than computing an unnecessary full result.
- **VAR** names reusable intermediate values and improves readability. A **DAX query** uses **EVALUATE** to return a table, with FILTER, CALCULATETABLE, ROW or SUMMARIZECOLUMNS shaping its output; DEFINE can introduce query-scoped measures.
Time intelligence and reusable calculations
- Use a complete **date table** with a unique date column and valid relationships. **DATESMTD** defines month-to-date; **SAMEPERIODLASTYEAR** shifts a date selection; **DATESINPERIOD** defines a rolling window around an anchor date.
- For rolling metrics, anchor the period to the selected or latest visible date and aggregate at the required grain. An average of survey scores and an average of customer-level averages are different calculations.
- **Calculation groups** apply reusable logic to explicit measures through **SELECTEDMEASURE()**. A month-to-date item can use **CALCULATE(SELECTEDMEASURE(), DATESMTD('Date'[Date]))**; consider precedence when groups interact.
- **Dynamic format strings** change currency or unit presentation while retaining a numeric measure. **FORMAT** returns text. Use **SELECTEDVALUE** to retrieve a selected format, with a fallback for multiple or missing selections.
- **Field parameters** let readers switch the measure or dimension used in a visual. Calculation groups transform selected measures; they do not serve the same purpose as swapping a chart axis.
Refresh, partitions and scale
- **Incremental refresh** uses case-sensitive Power Query parameters **RangeStart** and **RangeEnd**, normally Date/Time. Filter the partition column with one inclusive and one exclusive boundary, then configure storage and refresh windows.
- Verify that range predicates reach the source efficiently. Without **folding** or effective file pruning, each partition can scan excessive data. The first refresh can still be expensive because it populates historical partitions.
- Incremental policies can refresh recent periods, detect changes and restrict processing to complete periods. Match the policy to late corrections and source deletions; a high-water mark alone does not detect every historical update.
- **XMLA**, SSMS, Tabular Editor and TOM/TMSL support advanced partition management on eligible models. Distinguish Import-model partitions from **Delta table partitions**; Direct Lake does not use Import partition refresh in the same way.
- **Large semantic model storage format** supports large models and efficient XMLA operations on eligible capacities. **Query scale-out** uses read replicas to handle concurrency; synchronize replicas after updates and size capacity for the workload.
Model size and query optimization
- Remove unused columns and rows, choose compact data types, and reduce unnecessary cardinality. Split a high-cardinality **datetime** into date and time when this preserves required precision and improves compression.
- Replace unnecessary stored aggregations with **measures**. Move reusable classification and cleansing upstream; calculated columns increase model storage and refresh work. Keep row identifiers only when their analysis or relationship purpose requires them.
- **User-defined aggregations** map a smaller aggregate table to DirectQuery detail. **Automatic aggregations** use workload patterns to accelerate eligible queries. Validate aggregation matching and dimension storage modes.
- **Query caching** is scenario-dependent and does not generally accelerate every DirectQuery visual. For near-real-time reports, balance source performance, cached history, live partitions and refresh behavior against the required freshness.
Performance tools and metadata automation
- **Performance analyzer** separates DAX query, visual display and other time. Capture a slow visual's query before changing the model; a rendering bottleneck may require a simpler visual or fewer competing visuals.
- **DAX Studio Server Timings** separates formula-engine and storage-engine work and shows query behavior. Use representative filters and repeatable warm/cold cache conditions when comparing changes.
- **VertiPaq Analyzer** and supported storage DMVs reveal column cardinality, segment residency and memory use. **DISCOVER_STORAGE_TABLE_COLUMN_SEGMENTS** helps inspect loaded Direct Lake column segments.
- **Tabular Editor** supports bulk metadata scripts, security and **Best Practice Analyzer** rules for keys and summarization. **DiscourageImplicitMeasures** directs authors toward explicit measures. **ALM Toolkit** compares model schemas for controlled deployment.