Q54 — AWS DEA-C01 Ch.1
Question 54 of 100 | ← Chapter 1
A company receives .csv files that contain physical address data. The data is in columns that have the following names: Door_No, Street_Name, City, and Zip_Code. The company wants to create a single column to store these values in the following format: Which solution will meet this requirement with the LEAST coding effort?
- A. Use AWS Glue DataBrew to read the files. Use the NEST_TO_ARRAY transformation to create the new column.
- B. Use AWS Glue DataBrew to read the files. Use the NEST_TO_MAP transformation to create the new column. ✓
- C. Use AWS Glue DataBrew to read the files. Use the PIVOT transformation to create the new column.
- D. Write a Lambda function in Python to read the files. Use the Python data dictionary type to create the new column.
Correct Answer: B. Use AWS Glue DataBrew to read the files. Use the NEST_TO_MAP transformation to create the new column.
Explanation
AWS Glue DataBrew中的NEST_TO_MAP转换可将多个列的值合并为键值对结构,生成类似JSON的格式。题干要求将地址字段合并为一个新列,NEST_TO_MAP无需代码即可完成这种结构化处理。AWS官方文档提到NEST_TO_MAP用于合并列形成映射类型,而NEST_TO_ARRAY生成数组类型,PIVOT适用于行列转换场景。Lambda方案需手动编写Python代码处理数据字典,开发成本较高。选项B在DataBrew界面操作即可,符合最小编码投入需求。