Ngân hàng đề — Microsoft Azure Data Engineer

Tìm thấy 228 câu.

Câu 131 Chọn nhiều đáp án
You have a Log Analytics workspace named la1 and an Azure Synapse Analytics dedicated SQL pool named Pool1. Pool1 sends logs to la1.

You need to identify whether a recently executed query on Pool1 used the result set cache.

What are two ways to achieve the goal? Each correct answer presents a complete solution.

NOTE: Each correct selection is worth one point.
  1. A Review the sys.dm_pdw_sql_requests dynamic management view in Pool1.
  2. B Review the sys.dm_pdw_exec_requests dynamic management view in Pool1.
  3. C Use the Monitor hub in Synapse Studio.
  4. D Review the AzureDiagnostics table in la1.
  5. E Review the sys.dm_pdw_request_steps dynamic management view in Pool1.
Xem giải thích

🧩 Giải thích nội dung câu hỏi

Câu hỏi này thuộc chủ đề Azure Synapse Analytics (không phải AWS, có thể là nhầm lẫn trong yêu cầu), cụ thể là Dedicated SQL Pool (trước đây gọi là SQL Data Warehouse). Tình huống: Bạn có một Log Analytics workspace tên la1 và một Dedicated SQL Pool tên Pool1, với Pool1 gửi logs đến la1.
Mục tiêu: Xác định xem một truy vấn (query) gần đây trên Pool1 có sử dụng result set cache hay không (result set cache là tính năng lưu trữ tạm kết quả truy vấn để tái sử dụng nhanh, giúp tối ưu hiệu suất).
Câu hỏi yêu cầu hai cách để đạt mục tiêu, mỗi cách đúng là một giải pháp hoàn chỉnh (multi-select, mỗi đáp án đúng đáng 1 điểm).
📘 Kiến thức cập nhật: Theo tài liệu Microsoft Azure Synapse Analytics phiên bản mới nhất (tính đến 2026), result set caching được hỗ trợ trong Dedicated SQL Pools từ Gen2, và có thể kiểm tra qua DMVs (Dynamic Management Views) hoặc giao diện Synapse Studio. (Nguồn: Microsoft Docs - Result set caching và Monitor queries).

✅ Đáp án đúng và lý do lựa chọn

Hai đáp án đúng là:

  1. Review the sys.dm_pdw_exec_requests dynamic management view in Pool1
    🛠️ Lý do: DMV này chứa thông tin chi tiết về các request thực thi truy vấn, bao gồm cột result_cache_hit (giá trị 1 nếu truy vấn hit cache, 0 nếu miss hoặc không dùng cache). Bạn query DMV này trên Pool1 để lọc request gần đây bằng request_id hoặc submit_time.

  2. Use the Monitor hub in Synapse Studio
    🛠️ Lý do: Synapse Studio's Monitor hub (trong tab Monitor > Apache Sparks applications hoặc SQL requests) hiển thị chi tiết hoạt động truy vấn real-time, bao gồm cột Cache Hit hoặc Result Cache status cho từng query gần đây. Đây là cách trực quan, không cần SQL.

📋 Giải thích tất cả các phương án (đúng và sai)

Dưới đây là phân tích từng lựa chọn một cách chi tiết. Tôi giữ nguyên nội dung văn bản gốc bằng tiếng Anh, chỉ giải thích bằng tiếng Việt với emoji để dễ theo dõi:

  • Review the sys.dm_pdw_sql_requests dynamic management view in Pool1.
    ❌ Sai: DMV sys.dm_pdw_sql_requests chỉ theo dõi các SQL requests cơ bản (như status, submitter), không có thông tin về result set cache (không có cột result_cache_hit). Nó đã deprecated ở các phiên bản mới, không dùng để kiểm tra cache. (Nguồn: DMVs Synapse).

  • Review the sys.dm_pdw_exec_requests dynamic management view in Pool1.
    ✅ Đúng: Như đã giải thích ở phần đáp án, DMV này cung cấp đầy đủ info về execution requests, với cột result_cache_hit chính xác để xác định cache usage cho query gần đây (lọc bằng status = 'Completed' và end_time gần nhất).

  • Use the Monitor hub in Synapse Studio.
    ✅ Đúng: Giao diện Monitor hub trong Synapse Studio (truy cập qua Azure Portal > Synapse workspace > Monitor) hiển thị dashboard query activity với chi tiết cache hit/miss, text representation của query, và duration. Rất tiện lợi cho phân tích nhanh mà không cần code SQL.

  • Review the AzureDiagnostics table in la1.
    ❌ Sai: Bảng AzureDiagnostics trong Log Analytics (la1) lưu logs diagnostic từ Synapse (như query text, errors), nhưng không chứa thông tin cụ thể về result set cache hit/miss. Logs chủ yếu là metrics tổng quát, không chi tiết đến mức execution cache. (Nguồn: Log Analytics for Synapse).

  • Review the sys.dm_pdw_request_steps dynamic management view in Pool1.
    ❌ Sai: DMV sys.dm_pdw_request_steps chỉ hiển thị các bước thực thi chi tiết của một request (như operation_steps, distribution_id), không có dữ liệu về result set cache. Nó dùng để debug performance steps, không liên quan trực tiếp đến cache hit.

🏆 Kết luận và lưu ý

✅ Hai cách đúng hoàn chỉnh: Sử dụng sys.dm_pdw_exec_requests hoặc Monitor hub để kiểm tra nhanh chóng và chính xác.
🛠️ Mẹo thực hành: Để query DMV, dùng SELECT * FROM sys.dm_pdw_exec_requests WHERE submit_time > DATEADD(minute, -10, GETDATE()) ORDER BY end_time DESC;.
📘 Tài liệu tham khảo chính:

Câu 132
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You have an Azure Synapse Analytics dedicated SQL pool that contains a table named Table1.
You have files that are ingested and loaded into an Azure Data Lake Storage Gen2 container named container1.
You plan to insert data from the files in container1 into Table1 and transform the data. Each row of data in the files will produce one row in the serving layer of
Table1.
You need to ensure that when the source data files are loaded to container1, the DateTime is stored as an additional column in Table1.
Solution: In an Azure Synapse Analytics pipeline, you use a data flow that contains a Derived Column transformation.
Does this meet the goal?
  1. A Yes
  2. B No
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi thuộc dạng series questions trong kỳ thi chứng chỉ (có thể là AZ-305 hoặc DP-203), nơi mỗi câu có giải pháp riêng biệt để đạt mục tiêu. Lưu ý quan trọng: Sau khi trả lời, không thể quay lại, và không hiển thị ở màn hình review.

Kịch bản:

  • Bạn có Azure Synapse Analytics dedicated SQL pool chứa bảng Table1.
  • Các file dữ liệu được ingest và load vào Azure Data Lake Storage Gen2 (ADLS Gen2) container tên container1.
  • Kế hoạch: Insert dữ liệu từ files trong container1 vào Table1, đồng thời transform dữ liệu. Mỗi row trong file nguồn sẽ tạo chính xác 1 row trong serving layer của Table1.
  • Mục tiêu chính (goal): Đảm bảo rằng khi các file nguồn được load vào container1, một cột DateTime bổ sung sẽ được lưu trữ trong Table1 (nghĩa là thêm cột thời gian load hoặc tương tự vào bảng đích).

Giải pháp đề xuất (Solution):

  • Trong Azure Synapse Analytics pipeline, sử dụng data flow chứa Derived Column transformation.

Câu hỏi: Giải pháp này có đạt mục tiêu không? (Yes/No)

Bối cảnh kỹ thuật (dựa trên kiến thức Azure Synapse cập nhật đến 2026):

  • Data Flow trong Synapse Pipelines là công cụ ETL mạnh mẽ, hỗ trợ đọc từ ADLS Gen2, transform dữ liệu (bao gồm thêm cột mới), và sink trực tiếp vào dedicated SQL pool.
  • Derived Column transformation cho phép tạo cột mới dựa trên biểu thức, ví dụ: thêm toTimestamp(currentTimestamp()) hoặc toDate(now()) để capture thời gian load động.
  • Quy trình: Source (ADLS container1) → Data Flow (transform + Derived Column thêm DateTime) → Sink (Table1 trong dedicated SQL pool). Điều này đảm bảo mỗi row từ file được transform và insert với cột DateTime mới, không ảnh hưởng đến tỷ lệ 1:1 row.

📘 Tài liệu tham khảo:

✅ Đáp án đúng: Yes

Lý do lựa chọn:

  • Giải pháp hoàn toàn đạt mục tiêu 🛠️. Data Flow trong Synapse Pipeline đọc file từ ADLS Gen2, sử dụng Derived Column để thêm cột DateTime mới (ví dụ: thời gian hiện tại khi load), sau đó sink trực tiếp vào Table1.
  • Đảm bảo 1 row nguồn = 1 row đích, transform an toàn, và cột DateTime được thêm tự động khi load file vào container1 (qua pipeline trigger).
  • Đây là best practice cho ETL với transform trong Synapse (hỗ trợ Spark engine, scale-out).

📋 Giải thích tất cả các phương án

  • Yes ✅
    Đúng vì: Derived Column transformation trong Data Flow cho phép derive cột DateTime mới một cách linh hoạt (sử dụng hàm như currentTimestamp(), utcnow() hoặc toTimestamp()). Pipeline có thể trigger tự động khi file mới vào container1 (qua event trigger), đảm bảo DateTime được thêm chính xác lúc load mà không cần code thủ công. Hoàn hảo cho dedicated SQL pool sink, hỗ trợ upsert/insert với tỷ lệ 1:1.

  • No ❌
    Sai vì: Không có lý do nào giải pháp này thất bại. Nó không vi phạm ràng buộc (không dùng COPY command thuần cần schema cố định, không thiếu quyền truy cập ADLS). Nếu dùng các cách khác như PolyBase/CTAS, chúng kém linh hoạt hơn cho transform động; Data Flow chính là giải pháp chuẩn để thêm cột bổ sung mà không thay đổi source files.

Câu 133
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You have an Azure Synapse Analytics dedicated SQL pool that contains a table named Table1.
You have files that are ingested and loaded into an Azure Data Lake Storage Gen2 container named container1.
You plan to insert data from the files in container1 into Table1 and transform the data. Each row of data in the files will produce one row in the serving layer of
Table1.
You need to ensure that when the source data files are loaded to container1, the DateTime is stored as an additional column in Table1.
Solution: You use a dedicated SQL pool to create an external table that has an additional DateTime column.
Does this meet the goal?
  1. A Yes
  2. B No
Xem giải thích

🧩 Phân tích nội dung câu hỏi

Câu hỏi thuộc dạng series questions trong kỳ thi chứng chỉ (như AZ-305 hoặc DP-203), nơi mỗi câu trình bày một kịch bản giống nhau nhưng giải pháp duy nhất khác nhau. Sau khi trả lời, không thể quay lại xem lại.

Kịch bản cụ thể:

  • Bạn có Azure Synapse Analytics dedicated SQL pool chứa bảng Table1.
  • Có các file dữ liệu được ingest và load vào Azure Data Lake Storage Gen2 (ADLS Gen2) trong container tên container1.
  • Kế hoạch: Insert dữ liệu từ các file trong container1 vào Table1, đồng thời transform dữ liệu. Mỗi hàng dữ liệu trong file sẽ tạo ra một hàng duy nhất trong serving layer của Table1 (tức là phần dữ liệu sẵn sàng phục vụ query).
  • Mục tiêu chính (goal): Khi các file nguồn được load vào container1, đảm bảo cột DateTime được lưu trữ như một cột bổ sung (additional column) trong Table1.

Giải pháp đề xuất (Solution): Sử dụng dedicated SQL pool để tạo một external table có cột DateTime bổ sung.

Câu hỏi: Giải pháp này có đạt được mục tiêu không? (Does this meet the goal?)

📘 Ghi chú kiến thức cập nhật (đến 2026): Theo tài liệu Microsoft Azure Synapse Analytics mới nhất (version Synapse Runtime 3.x+ và SQL Pool Gen2), external table chỉ dùng để query dữ liệu external từ ADLS mà không di chuyển dữ liệu vào SQL pool. Để load dữ liệu vào Table1 với transform (bao gồm thêm cột DateTime), cần sử dụng CTAS (CREATE TABLE AS SELECT), COPY INTO, hoặc INSERT INTO từ external table/OpenRowset, kết hợp hàm như GETDATE() hoặc SYSDATETIME() cho cột DateTime. Giải pháp chỉ tạo external table không tự động insert/load vào Table1.

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng: No
🛠️ Lý do: Giải pháp chỉ tạo external table với cột DateTime bổ sung, cho phép query dữ liệu từ ADLS container1 như một bảng ảo. Tuy nhiên, nó không insert dữ liệu vào Table1 (serving layer), và không tự động thêm cột DateTime khi file được load vào container1. Dữ liệu vẫn nằm ngoài SQL pool, không đáp ứng yêu cầu "insert data from files into Table1" và "each row produces one row in Table1". Để đạt goal, cần thêm bước load/transform explicit như CTAS với SELECT ..., GETDATE() AS DateTimeColumn FROM ExternalTable.

📋 Giải thích tất cả các phương án

  • Yes
    ❌ Sai: Phương án này cho rằng tạo external table với cột DateTime là đủ. Thực tế, external table chỉ map metadata đến file ADLS, không load dữ liệu vào Table1 và không trigger thêm cột DateTime tự động khi file mới arrive. Không có transform/insert xảy ra, vi phạm goal về serving layer trong Table1.

  • No
    ✅ Đúng: External table hữu ích cho query federated, nhưng không đáp ứng yêu cầu insert/transform/load vào dedicated SQL pool. Theo docs, phải dùng PolyBase/CTAS/COPY để thêm cột DateTime (ví dụ: CREATE TABLE NewTable WITH (...) AS SELECT *, SYSDATETIME() FROM OPENROWSET(...)). Giải pháp thiếu bước này nên fail goal.

📚 Tài liệu tham khảo

🧠 Mẹo thi cử: Trong series questions, kiểm tra xem solution có full end-to-end (từ external đến internal load) không!

Câu 134
You have an Azure data factory named DF1. DF1 contains a single pipeline that is executed by using a schedule trigger.

From Diagnostics settings, you configure pipeline runs to be sent to a resource-specific destination table in a Log Analytics workspace.

You need to run KQL queries against the table.

Which table should you query?
  1. A ADFPipelineRun
  2. B ADFTriggerRun
  3. C ADFActivityRun
  4. D AzureDiagnostics
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi tập trung vào Azure Data Factory (ADF), một dịch vụ ETL/ELT trên Microsoft Azure dùng để xây dựng và quản lý pipeline dữ liệu. Cụ thể:

  • Bạn có một ADF tên DF1 chứa một pipeline duy nhất, được kích hoạt (executed) bởi schedule trigger (lịch trình kích hoạt).
  • Từ Diagnostics settings (cài đặt chẩn đoán), bạn cấu hình pipeline runs (các lần chạy pipeline) được gửi đến resource-specific destination table (bảng đích dành riêng cho tài nguyên) trong Log Analytics workspace.
  • Mục tiêu: Chạy KQL queries (Kusto Query Language - ngôn ngữ truy vấn của Log Analytics) để phân tích dữ liệu log từ table đó.

Vấn đề cốt lõi: Xác định table chính xác trong Log Analytics workspace chứa dữ liệu log về pipeline runs khi được cấu hình qua Diagnostics settings ở mức resource-specific. Điều này giúp theo dõi hiệu suất, lỗi, thời gian chạy pipeline mà không cần dùng các table chung chung. ✅ Kiến thức dựa trên tài liệu Azure Data Factory cập nhật đến 2026 (Azure Monitor Logs schema không thay đổi cơ bản từ 2023).

📘 Nguồn tham khảo:

✅ Đáp án đúng: ADFPipelineRun

Lý do lựa chọn:

  • Khi kích hoạt Diagnostics settings cho ADF và chọn resource-specific tables (không phải AzureDiagnostics chung), log về pipeline runs sẽ được lưu trực tiếp vào table ADFPipelineRun.
  • Table này chứa chi tiết như: PipelineName, RunId, Start/End time, Status (Succeeded/Failed), Parameters, Error message... phù hợp để query KQL về các lần chạy pipeline từ schedule trigger. 🛠️ Đây là table chuyên biệt cho pipeline-level monitoring, giúp phân tích hiệu suất toàn pipeline một cách chính xác và hiệu quả nhất.

📋 Giải thích tất cả các phương án (đúng/sai)

  • ✅ ADFPipelineRun:
    Đúng vì đây là table resource-specific dành riêng cho log pipeline runs trong ADF Diagnostics. Khi cấu hình gửi pipeline runs từ DF1 đến Log Analytics, dữ liệu sẽ populate vào table này. Bạn có thể query KQL ví dụ: ADFPipelineRun | where PipelineName == "YourPipeline" | summarize avg(DurationMs) by bin(Start, 1h). Hoàn hảo cho theo dõi pipeline từ schedule trigger! 🏆

  • ❌ ADFTriggerRun:
    Sai vì table này chỉ log về trigger runs (các lần kích hoạt trigger, như schedule hoặc tumbling window). Nó không chứa dữ liệu pipeline runs chi tiết, mà tập trung vào TriggerName, TriggerRunId, kích hoạt pipeline chứ không phải execution của pipeline itself. Không phù hợp cho query pipeline runs trực tiếp.

  • ❌ ADFActivityRun:
    Sai vì table này dành cho activity runs (các hoạt động con bên trong pipeline, như copy activity, lookup...). Nó chi tiết ở mức activity-level (ActivityName, UserProperties, Input/Output), không phải toàn bộ pipeline run. Sử dụng cho debug sâu activity, không phải overview pipeline.

  • ❌ AzureDiagnostics:
    Sai vì đây là table chung chung (generic) cho tất cả Azure resources khi chọn "Send to Log Analytics workspace" ở mức AzureDiagnostics category. Nó không phải resource-specific cho ADF, dữ liệu bị pha loãng và schema khác (bao gồm Category, ResourceId), khó query KQL chuyên sâu cho ADF pipeline runs. Chỉ dùng nếu không cấu hình resource-specific.

Kết luận 🧠: Chọn ADFPipelineRun để query hiệu quả nhất, tuân thủ best practices Azure Monitor cho ADF đến 2026. Nếu cần ví dụ KQL đầy đủ, hãy hỏi thêm! 🚀

Câu 135
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You have an Azure Synapse Analytics dedicated SQL pool that contains a table named Table1.
You have files that are ingested and loaded into an Azure Data Lake Storage Gen2 container named container1.
You plan to insert data from the files in container1 into Table1 and transform the data. Each row of data in the files will produce one row in the serving layer of
Table1.
You need to ensure that when the source data files are loaded to container1, the DateTime is stored as an additional column in Table1.
Solution: You use an Azure Synapse Analytics serverless SQL pool to create an external table that has an additional DateTime column.
Does this meet the goal?
  1. A Yes
  2. B No
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

  • Bối cảnh câu hỏi: Đây là một phần của series câu hỏi với cùng scenario, nơi mỗi câu đưa ra giải pháp riêng để kiểm tra xem có đạt mục tiêu không. Bạn có Azure Synapse Analytics dedicated SQL pool chứa bảng Table1 (là serving layer chính). Các file dữ liệu được ingest và load vào Azure Data Lake Storage Gen2 (ADLS Gen2) trong container container1.
  • Yêu cầu chính (goal): Khi các file nguồn được load vào container1, cần insert dữ liệu từ files vào Table1, đồng thời transform dữ liệu sao cho mỗi row trong file tạo ra đúng 1 row trong Table1, và thêm một cột DateTime bổ sung vào Table1 (đại diện cho thời gian load hoặc metadata tương tự).
  • Giải pháp đề xuất (Solution): Sử dụng Azure Synapse Analytics serverless SQL pool để tạo một external table với cột DateTime bổ sung.
  • Câu hỏi kiểm tra: Giải pháp này có đạt mục tiêu không? (Yes/No).
  • Đặc điểm kỹ thuật liên quan (cập nhật đến 2026):
    • Dedicated SQL pool dùng để lưu trữ, phục vụ dữ liệu hiệu suất cao (MPP - Massively Parallel Processing).
    • Serverless SQL pool chỉ hỗ trợ query on-demand từ external storage như ADLS Gen2 qua external tables hoặc OPENROWSET, không hỗ trợ write/insert trực tiếp vào dedicated SQL pool.
    • Để thêm cột DateTime khi load, thường dùng COPY INTO (với FILEMETADATA) trong dedicated pool, Data Flow/Pipeline trong Synapse, hoặc Spark pool để transform và append metadata trước khi CTAS/COPY.

📘 Tài liệu tham khảo:

✅ Đáp án đúng: No

Lý do lựa chọn:

  • Giải pháp chỉ tạo external table trong serverless SQL pool, giúp query dữ liệu từ ADLS Gen2 với cột DateTime bổ sung (qua computed column hoặc OPENROWSET), nhưng KHÔNG insert/transform dữ liệu vào Table1 trong dedicated SQL pool.
  • Serverless pool không có khả năng write vào dedicated pool; nó chỉ đọc external data. Goal yêu cầu insert và transform vào serving layer (Table1) với 1:1 row mapping và thêm DateTime khi load vào container1, đòi hỏi cơ chế load thực sự như COPY INTO từ dedicated pool hoặc pipeline với metadata injection.
  • ❌ Không đạt goal vì external table chỉ là "view ảo" read-only, không tự động lưu DateTime vào Table1.

🛠️ Giải thích tất cả các phương án (Yes/No)

  • Yes ❌
    Sai vì: Phương án này giả định external table ở serverless sẽ tự động insert/transform dữ liệu vào Table1 với cột DateTime. Thực tế, serverless SQL pool chỉ hỗ trợ đọc dữ liệu external (qua external table hoặc OPENROWSET), không insert vào dedicated SQL pool. Không có cơ chế tự động "khi load vào container1" để lưu DateTime vào Table1 – cần dedicated pool hoặc pipeline riêng. Ví dụ: External table chỉ cho phép SELECT, không INSERT INTO Table1.

  • No ✅
    Đúng vì: Như phân tích trên, giải pháp không đáp ứng yêu cầu insert/transform vào Table1 (serving layer) với thêm cột DateTime. Serverless external table chỉ query, không load dữ liệu persistent vào dedicated pool. Giải pháp đúng hơn có thể là:

    • Sử dụng COPY INTO Table1 từ dedicated pool với FILEMETADATA (thêm cột load_time = file_modificationtime()).
    • Hoặc Synapse Pipeline/Data Flow để transform/add DateTime trước khi sink vào Table1.
      🧩 Gợi ý thay thế: COPY INTO Table1 FROM 'abfss://container1@storage.dfs.core.windows.net/path' WITH (FILEMETADATA = true) để tự động thêm metadata DateTime (cập nhật Synapse 2025+).

Hy vọng phân tích giúp bạn nắm rõ! 🚀 Nếu cần ví dụ code, hãy hỏi thêm.

Câu 136
You have an Azure Synapse Analytics dedicated SQL pool that contains a table named Table1. Table1 contains the following:
✑ One billion rows
✑ A clustered columnstore index
✑ A hash-distributed column named Product Key
✑ A column named Sales Date that is of the date data type and cannot be null
Thirty million rows will be added to Table1 each month.
You need to partition Table1 based on the Sales Date column. The solution must optimize query performance and data loading.
How often should you create a partition?
  1. A once per month
  2. B once per year
  3. C once per day
  4. D once per week
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi tập trung vào Azure Synapse Analytics dedicated SQL pool (một dịch vụ phân tích dữ liệu lớn của Microsoft Azure, trước đây gọi là SQL Data Warehouse). Bảng Table1 có các đặc điểm chính:

  • 1 tỷ rows dữ liệu lớn.
  • Clustered columnstore index (chỉ mục cột phân cụm, tối ưu cho dữ liệu lớn và nén dữ liệu).
  • Hash-distributed trên cột Product Key (phân phối dữ liệu theo hash để song song hóa xử lý).
  • Cột Sales Date kiểu date, không null (cột ngày bán hàng, phù hợp làm khóa phân vùng).
  • Thêm 30 triệu rows mỗi tháng (tốc độ tải dữ liệu lớn và đều đặn hàng tháng).

Mục tiêu: Phân vùng (partition) bảng dựa trên Sales Date để tối ưu hóa hiệu suất truy vấn (query performance) và tải dữ liệu (data loading). Câu hỏi yêu cầu xác định tần suất tạo partition phù hợp nhất.

🛠️ Nguyên tắc phân vùng trong Azure Synapse dedicated SQL pool (cập nhật đến 2026):

  • Partitioning giúp loại bỏ dữ liệu không liên quan (data elimination) khi query, tăng tốc độ.
  • Với hash-distributed table, partition trên cột khác distribution key (Sales Date ≠ Product Key) là khả thi.
  • Tần suất partition nên phù hợp với mô hình tải dữ liệu (data ingestion pattern): Không quá nhỏ (overhead quản lý nhiều partition) và không quá lớn (partition quá to, chậm loading/query).
  • Best practice: Align partition boundaries với monthly data loads để switch/merge partitions nhanh chóng.

📘 Tài liệu tham khảo:

✅ Đáp án đúng: once per month

Lý do chọn đáp án này 🏆:

  • Với 30 triệu rows/tháng, việc tạo partition hàng tháng khớp chính xác với tần suất tải dữ liệu, giúp:
    • Tối ưu data loading: Sử dụng partition switching để load nhanh dữ liệu mới vào staging table rồi switch sang partition chính (giảm downtime).
    • Tối ưu query performance: Query lọc theo Sales Date sẽ chỉ scan partition liên quan (data elimination), đặc biệt hiệu quả với clustered columnstore index.
    • Tránh overhead: Không quá nhiều partition (giữ ~12-24 partitions/năm), dễ quản lý merge/archive cũ.
  • Đây là best practice từ Microsoft cho dedicated SQL pools với mô hình tải monthly.

📋 Giải thích tất cả các phương án

  • once per month ✅
    Đúng vì lý do trên: Align hoàn hảo với 30M rows/tháng, tối ưu switch/load/query mà không overhead lớn. Phù hợp clustered columnstore và hash distribution.

  • once per year ❌
    Sai vì partition yearly sẽ quá lớn (360M rows/năm), dẫn đến:

    • Loading chậm (không switch dễ dàng).
    • Query kém hiệu quả (scan toàn partition lớn ngay cả khi lọc date).
    • Không tận dụng data elimination tốt cho tải monthly.
  • once per day ❌
    Sai vì quá chi tiết (900K rows/ngày x 30 = monthly), tạo ~365 partitions/năm gây:

    • Overhead quản lý cao (metadata lớn, chậm maintenance).
    • Clustered columnstore kém hiệu quả với partition nhỏ (<1M rows/partition).
    • Không cần thiết vì dữ liệu thêm monthly aggregate.
  • once per week ❌
    Sai vì vẫn quá nhỏ (~7.5M rows/tuần), ~52 partitions/năm:

    • Overhead cao hơn monthly nhưng chưa align chính xác với tải dữ liệu.
    • Query/load tốt hơn yearly nhưng kém monthly (khó switch chính xác theo tháng).
    • Microsoft khuyến nghị tránh weekly cho large tables để giảm fragmentation.
Câu 137
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You have an Azure Synapse Analytics dedicated SQL pool that contains a table named Table1.
You have files that are ingested and loaded into an Azure Data Lake Storage Gen2 container named container1.
You plan to insert data from the files in container1 into Table1 and transform the data. Each row of data in the files will produce one row in the serving layer of
Table1.
You need to ensure that when the source data files are loaded to container1, the DateTime is stored as an additional column in Table1.
Solution: In an Azure Synapse Analytics pipeline, you use a Get Metadata activity that retrieves the DateTime of the files.
Does this meet the goal?
  1. A Yes
  2. B No
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi thuộc dạng case study (một loạt câu hỏi cùng ngữ cảnh), tập trung vào Azure Synapse Analytics dedicated SQL pool với bảng Table1.

  • Ngữ cảnh: Bạn có files được ingest và load vào Azure Data Lake Storage Gen2 container tên container1.
  • Yêu cầu chính: Khi load dữ liệu từ files trong container1 vào Table1 (serving layer), mỗi row trong file sẽ tạo một row trong Table1, đồng thời transform dữ liệu và thêm cột DateTime (thời gian của file, có lẽ là lastModified) như một additional column trong Table1.
  • Giải pháp đề xuất: Trong Azure Synapse Analytics pipeline, sử dụng Get Metadata activity để retrieve DateTime của các files.
  • Câu hỏi then chốt: Giải pháp này có đạt mục tiêu (meet the goal) không? (Yes/No).

Mục tiêu cốt lõi là tự động thêm cột DateTime của file vào Table1 khi load dữ liệu, không chỉ retrieve metadata mà phải insert/transform nó vào bảng. (Kiến thức cập nhật Azure Synapse Analytics đến 2026: Get Metadata hỗ trợ metadata như lastModified, nhưng cần kết hợp với các activity khác như Copy Data hoặc Stored Procedure để thêm cột. Phiên bản mới nhất hỗ trợ dynamic content và parameterization tốt hơn, nhưng giải pháp này thiếu bước insert).

📘 Tài liệu tham khảo:

✅ Đáp án đúng: No

Lý do lựa chọn 🛠️:

  • Get Metadata activity chỉ lấy (retrieve) metadata của files (như lastModified DateTime) từ container1, nhưng KHÔNG tự động insert hoặc transform nó thành additional column trong Table1.
  • Để đạt mục tiêu, cần kết hợp thêm các activity khác như:
    • Sử dụng ForEach loop qua files, parameterize Copy activity với @activity('GetMetadata').output.item.lastModified.
    • Hoặc Data Flow để thêm cột động.
  • Giải pháp chỉ dừng ở retrieve, thiếu bước load/transform vào Table1, nên KHÔNG meet the goal. Đây là câu hỏi kiểu "partial solution" phổ biến trong case study Azure exams.

📋 Giải thích tất cả các phương án

  • Yes ❌ SAI:

    • Phương án này cho rằng chỉ cần Get Metadata là đủ để lưu DateTime vào Table1. Thực tế, activity chỉ output metadata dưới dạng JSON (ví dụ: { "lastModified": "2023-10-01T12:00:00Z" }), không có cơ chế tự động thêm cột vào dedicated SQL pool. Không có pipeline step nào insert dữ liệu từ metadata này vào Table1, dẫn đến không đạt yêu cầu "stored as an additional column". Trong thực tế Azure Synapse (2026), metadata chỉ là input cho activity tiếp theo, không phải output trực tiếp vào table.
  • No ✅ ĐÚNG:

    • Như phân tích trên, giải pháp thiếu hoàn chỉnh. Get Metadata hữu ích để lấy DateTime (childItems, lastModified), nhưng phải dùng dynamic expressions trong Copy activity (ví dụ: thêm column mapping @pipeline().parameters.fileDateTime) hoặc SQL script trong Stored Procedure activity để insert {data_from_file, fileDateTime} vào Table1. Đây là cách chuẩn để "ensure" additional column khi load từ ADLS Gen2. Giải pháp hiện tại chỉ là bước đầu, không cover toàn bộ pipeline flow.
Câu 138
You have an Azure subscription that contains an Azure Synapse workspace named WS1 and an Azure Monitor action group named Group1. WS1 has a dedicated SQL pool.

You plan to archive monitoring data for integration activity runs.

You need to ensure that you can configure custom alerts based on the archived data that will execute Group1. The solution must minimize administrative effort.

Which diagnostic setting should you select?
  1. A Send to Log Analytics workspace
  2. B Archive to a storage account
  3. C Stream to an event hub
  4. D Send to a partner solution
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi tập trung vào việc cấu hình diagnostic settings (cài đặt chẩn đoán) cho một Azure Synapse workspace tên WS1 (có dedicated SQL pool) trong Azure subscription. Mục tiêu chính là lưu trữ (archive) dữ liệu giám sát cho integration activity runs (các hoạt động tích hợp như pipeline runs trong Synapse). Sau đó, cần cấu hình custom alerts (cảnh báo tùy chỉnh) dựa trên dữ liệu đã lưu trữ này, và các cảnh báo đó phải kích hoạt action group Group1 (nhóm hành động trong Azure Monitor). Giải pháp phải giảm thiểu nỗ lực quản trị (minimize administrative effort), nghĩa là tránh các bước phức tạp, tự động hóa cao nhất có thể.

🛠️ Tình huống chính:

  • Dữ liệu giám sát từ Synapse (như logs của integration activities) cần được lưu trữ.
  • Alerts phải dựa trên dữ liệu lưu trữ đó.
  • Alerts kích hoạt Group1 (có thể gửi email, SMS, webhook, v.v.).
  • Ưu tiên giải pháp đơn giản, ít can thiệp thủ công.

📘 Kiến thức liên quan (cập nhật đến 2026): Theo tài liệu Azure Monitor và Synapse Analytics mới nhất (Azure Synapse runtime 2024+), diagnostic settings hỗ trợ gửi logs đến 4 đích chính. Để alerts hoạt động trực tiếp trên dữ liệu lưu trữ với action group, cần nơi hỗ trợ query logs thời gian thực và alert rules native mà không cần tool trung gian.

Nguồn tham khảo:

✅ Đáp án đúng: Send to Log Analytics workspace

Lý do lựa chọn:

  • 🟢 Send to Log Analytics workspace cho phép lưu trữ logs trong Log Analytics (phần của Azure Monitor), hỗ trợ query bằng Kusto Query Language (KQL) để phân tích dữ liệu integration activity runs.
  • Từ dữ liệu này, bạn có thể tạo alert rules trực tiếp dựa trên log queries (log search alerts), và gắn action group Group1 ngay lập tức mà không cần code thêm hoặc tool ngoài.
  • Minimize admin effort: Toàn bộ quy trình native trong Azure Monitor – chỉ cần vài cú click trong portal để config diagnostic setting và alert rule. Không cần ETL, Stream Analytics hay Logic Apps.
  • Hỗ trợ retention linh hoạt (archive dài hạn) và chi phí tối ưu cho alerting.

📋 Giải thích tất cả các phương án (đúng/sai)

  • ✅ Send to Log Analytics workspace
    Đúng vì đây là lựa chọn tối ưu: Logs được gửi trực tiếp vào Log Analytics workspace, nơi hỗ trợ log analytics queries và alerts dựa trên logs. Bạn có thể tạo custom alerts (ví dụ: alert khi integration run thất bại > threshold) và attach Group1 ngay. Không cần bước trung gian, phù hợp hoàn hảo với yêu cầu minimize effort. Synapse hỗ trợ category như IntegrationActivityRuns gửi đến đây.

  • ❌ Archive to a storage account
    Sai vì chỉ lưu trữ logs dưới dạng JSON blobs (archive rẻ tiền), nhưng không hỗ trợ query/alert native. Để alert dựa trên dữ liệu này, cần tool thêm như Azure Functions, Logic Apps hoặc Event Grid – tăng admin effort đáng kể (viết code parse JSON, schedule queries). Không trực tiếp execute Group1.

  • ❌ Stream to an event hub
    Sai vì đây là streaming real-time (Capture feature), phù hợp xử lý event cao tải nhưng không phải archive lâu dài. Để alert, cần consumer như Stream Analytics hoặc Functions để ingest vào Log Analytics trước, rồi mới alert – phức tạp, tốn effort config pipeline, không minimize admin.

  • ❌ Send to a partner solution
    Sai vì gửi đến third-party (như Splunk, Sumo Logic), yêu cầu cấu hình partner integration và license ngoài. Alerts tùy thuộc partner tool, không native attach Group1 từ Azure Monitor. Tăng effort quản lý (multi-vendor), không phù hợp yêu cầu đơn giản hóa.

🛠️ Khuyến nghị triển khai: Trong Azure Portal > Synapse WS1 > Diagnostic settings > Add diagnostic setting > Chọn categories như IntegrationActivityRuns > Destination: Log Analytics workspace > Save. Sau đó, Azure Monitor > Alerts > New alert rule > Scope: Log Analytics > Condition: Log query.

Hy vọng phân tích này giúp bạn nắm vững! 🚀

Câu 139
You have an Azure Databricks workspace that contains a Delta Lake dimension table named Table1.
Table1 is a Type 2 slowly changing dimension (SCD) table.
You need to apply updates from a source table to Table1.
Which Apache Spark SQL operation should you use?
  1. A CREATE
  2. B UPDATE
  3. C ALTER
  4. D MERGE
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi tập trung vào Azure Databricks workspace chứa một bảng Delta Lake có tên Table1, đây là một bảng dimension theo mô hình Slowly Changing Dimension (SCD) Type 2.
📝 Nội dung chính:

  • SCD Type 2 là kỹ thuật quản lý dữ liệu thay đổi chậm, nơi mỗi bản ghi thay đổi sẽ tạo ra một phiên bản mới (new row) với các trường như valid_from, valid_to, is_current để theo dõi lịch sử, thay vì ghi đè dữ liệu cũ.
  • Nhiệm vụ: Áp dụng các cập nhật (updates) từ một source table vào Table1.
  • Câu hỏi yêu cầu chọn Apache Spark SQL operation phù hợp nhất để thực hiện việc này một cách hiệu quả, an toàn và hỗ trợ ACID transactions trong Delta Lake.

🛠️ Bối cảnh kỹ thuật: Delta Lake (trên Azure Databricks) hỗ trợ các operation mạnh mẽ cho upsert (update + insert), đặc biệt lý tưởng cho SCD Type 2 nhờ khả năng MERGE với điều kiện matching và xử lý lịch sử dữ liệu. Phiên bản Delta Lake mới nhất (tính đến 2026, Delta Lake 3.x+ trên Databricks Runtime 14.x+) vẫn ưu tiên MERGE cho các kịch bản này.

✅ Đáp án đúng: MERGE

Lý do lựa chọn:
MERGE là operation chuẩn của Delta Lake để upsert dữ liệu (update nếu khớp, insert nếu không khớp), hoàn hảo cho SCD Type 2. Nó cho phép:

  • Match key (ví dụ: customer_id).
  • Cập nhật trường business (như address) bằng cách tạo row mới với timestamp mới và đánh dấu row cũ là không active (valid_to = current_date).
  • Hỗ trợ ACID transactions, time travel và optimize performance.
    Ví dụ cú pháp:
MERGE INTO Table1 AS target  
USING source_table AS source  
ON target.key = source.key AND target.is_current = true  
WHEN MATCHED THEN UPDATE SET ...  
WHEN NOT MATCHED THEN INSERT ...  

Điều này đảm bảo lịch sử dữ liệu được bảo toàn mà không mất mát.

📋 Giải thích tất cả các phương án (đúng/sai)

  • ❌ [SAI] CREATE
    Phân tích: CREATE chỉ dùng để tạo bảng mới từ đầu (như CREATE TABLE Table1 AS SELECT ...), không hỗ trợ cập nhật hoặc merge dữ liệu hiện có. Với Table1 đã tồn tại và cần apply updates từ source, CREATE sẽ thất bại hoặc ghi đè toàn bộ (không phù hợp SCD Type 2, mất lịch sử dữ liệu). Không xử lý upsert an toàn.

  • ❌ [SAI] UPDATE
    Phân tích: UPDATE chỉ cập nhật row hiện có dựa trên WHERE clause (ví dụ: UPDATE Table1 SET column = value WHERE id = x), nhưng không tự động insert row mới cho SCD Type 2 hoặc xử lý trường hợp key mới từ source. Dễ gây lỗi logic (overwrite lịch sử), thiếu atomicity khi có insert đồng thời, và kém hiệu quả so với MERGE.

  • ❌ [SAI] ALTER
    Phân tích: ALTER dùng để thay đổi schema/structure của bảng (như ALTER TABLE Table1 ADD COLUMN ... hoặc RENAME), không áp dụng cho việc cập nhật dữ liệu từ source table. Hoàn toàn không liên quan đến upsert hoặc SCD management, sẽ báo lỗi nếu cố dùng cho data manipulation.

  • ✅ [ĐÚNG] MERGE
    Phân tích: Như đã giải thích ở trên, MERGE là operation tối ưu cho SCD Type 2 trong Delta Lake, hỗ trợ conditional logic (MATCHED/NOT MATCHED), bảo toàn lịch sử, và scale lớn. Được khuyến nghị chính thức cho các workload data engineering trên Azure Databricks.

📘 Tài liệu tham khảo (cập nhật mới nhất 2026)

🛠️ Lời khuyên thực hành: Trong Azure Databricks, luôn dùng OPTIMIZE Table1 ZORDER BY (key) sau MERGE để boost performance! Nếu cần code sample đầy đủ, hãy cung cấp thêm chi tiết schema. 🚀

Câu 140
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You have an Azure Data Lake Storage account that contains a staging zone.
You need to design a daily process to ingest incremental data from the staging zone, transform the data by executing an R script, and then insert the transformed data into a data warehouse in Azure Synapse Analytics.
Solution: You use an Azure Data Factory schedule trigger to execute a pipeline that executes an Azure Databricks notebook, and then inserts the data into the data warehouse.
Does this meet the goal?
  1. A Yes
  2. B No
Xem giải thích

🧩 Giải thích nội dung câu hỏi

Câu hỏi thuộc dạng case study trong kỳ thi chứng chỉ Azure (giống DP-203), nơi có nhiều câu hỏi liên quan đến cùng một tình huống. Tình huống cụ thể:
Bạn có một tài khoản Azure Data Lake Storage (ADLS) chứa staging zone (vùng lưu trữ tạm).
Yêu cầu thiết kế quy trình hàng ngày (daily process):

  • Ingest incremental data (hấp thụ dữ liệu tăng dần, chỉ phần mới/thay đổi) từ staging zone.
  • Transform dữ liệu bằng cách thực thi một R script (chạy script R để biến đổi dữ liệu).
  • Insert dữ liệu đã transform vào data warehouse trong Azure Synapse Analytics (thường là Dedicated SQL Pool).

Giải pháp đề xuất: Sử dụng Azure Data Factory (ADF) schedule trigger để kích hoạt pipeline, pipeline này sẽ thực thi một Azure Databricks notebook, sau đó insert dữ liệu vào data warehouse.
Câu hỏi: Does this meet the goal? (Giải pháp này có đạt mục tiêu không?).
📝 Lưu ý: Đây là câu hỏi một chiều, không quay lại được sau khi trả lời.

✅ Đáp án đúng: Yes

Lý do lựa chọn: Giải pháp hoàn toàn đáp ứng yêu cầu!

  • ADF schedule trigger đảm bảo quy trình chạy hàng ngày (daily).
  • Pipeline ADF có thể ingest incremental data từ ADLS staging zone (sử dụng Lookup/GetMetadata để xác định file mới, truyền parameter vào notebook).
  • Azure Databricks notebook hỗ trợ thực thi R script trực tiếp (qua ngôn ngữ R trong notebook hoặc SparkR cho xử lý phân tán), thực hiện transform dữ liệu. Notebook đọc dữ liệu từ ADLS, transform bằng R, rồi ghi kết quả ra vị trí trung gian (ví dụ: ADLS khác).
  • Sau notebook, pipeline ADF tiếp tục insert vào Synapse data warehouse (sử dụng Copy activity với Sink là Synapse Dedicated SQL Pool qua PolyBase hoặc COPY command).
    🛠️ Toàn bộ luồng: ADF → Databricks (R transform) → ADF Copy → Synapse. Hoàn hảo, linh hoạt và scalable theo kiến thức Azure cập nhật đến 2026 (Databricks Runtime 14.x+ hỗ trợ R đầy đủ).

📋 Giải thích tất cả các phương án

  • Yes ✅
    Đúng vì giải pháp khớp chính xác yêu cầu: ADF xử lý orchestrate/orchestration và incremental ingest qua parameter passing; Databricks notebook linh hoạt chạy R script để transform (hỗ trợ R kernel/native R code); sau đó ADF insert vào Synapse. Đây là best practice cho hybrid workload (storage → compute → warehouse). Không vi phạm bất kỳ ràng buộc nào, và hỗ trợ incremental qua file listing hoặc delta processing trong Databricks.

  • No ❌
    Sai vì không có lý do thuyết phục để phủ nhận. Giải pháp không thiếu thành phần nào (không cần Synapse Spark pool riêng vì Databricks đã đủ cho R transform); incremental ingest khả thi qua ADF activities; insert sau notebook OK nhờ sequencing trong pipeline. Chọn No sẽ bỏ lỡ khả năng tích hợp mạnh mẽ của Azure ecosystem (ADF + Databricks + Synapse).

📘 Tài liệu tham khảo (cập nhật mới nhất 2026)

Hy vọng phân tích giúp bạn nắm vững! 🚀 Nếu cần thêm chi tiết thiết kế pipeline, hỏi nhé!