Implementing Analytics Solutions Using Microsoft Fabric — Question 124
You have a Fabric tenant that contains a data warehouse.
You need to load rows into a large Type 2 slowly changing dimension (SCD). The solution must minimize resource usage.
Which T-SQL statement should you use?
Answer options
- A. UPDATE AND INSERT
- B. MERGE
- C. TRUNCATE TABLE and INSERT
- D. CREATE TABLE AS SELECT
Correct answer: B
Explanation
The MERGE statement is specifically designed for efficiently merging data, making it ideal for handling Type 2 slowly changing dimensions as it can perform both updates and inserts in a single operation, thus optimizing resource usage. The other options either require multiple steps or are not suitable for this type of operation, making them less efficient.