MLS-C01 练习题

MLS-C01 题目讲解:两来源训练集用 Glue ETL 生成 S3 输出

MLS-C01 练习题讲解。答案 D。DynamoDB 传感器和 S3 天气 JSON 需要按地点与时间关联成训练样本。

MLS-C01 免费试练题 · 考证匠讲解

题目

A machine learning specialist stores IoT soil sensor data in Amazon DynamoDB table and stores weather event data as JSON files in Amazon S3. The dataset in DynamoDB is 10 GB in size and the dataset in Amazon S3 is 5 GB in size. The specialist wants to train a model on this data to help predict soil moisture levels as a function of weather events using Amazon SageMaker. Which solution will accomplish the necessary transformation to train the Amazon SageMaker model with the LEAST amount of administrative overhead?

A. Launch an Amazon EMR cluster. Create an Apache Hive external table for the DynamoDB table and S3 data. Join the Hive tables and write the results out to Amazon S3.
B. Crawl the data using AWS Glue crawlers. Write an AWS Glue ETL job that merges the two tables and writes the output to an Amazon Redshift cluster.
C. Enable Amazon DynamoDB Streams on the sensor table. Write an AWS Lambda function that consumes the stream and appends the results to the existing weather files in Amazon S3.
D. Crawl the data using AWS Glue crawlers. Write an AWS Glue ETL job that merges the two tables and writes the output in CSV format to Amazon S3.

答案

答案 D。DynamoDB 传感器和 S3 天气 JSON 需要按地点与时间关联成训练样本。

拆题

  • DynamoDB 传感器和 S3 天气 JSON 需要按地点与时间关联成训练样本。
  • Glue crawler 建元数据,ETL job 做转换与 join,输出算法支持格式。
  • S3 不支持简单原地追加对象,DynamoDB Streams 也只包含变化,不等于全量训练基线。

每个选项为什么对、为什么错

  • A:EMR Hive 能实现,但对本题 15 GB 的数据量引入额外集群管理,运营开销更大。
  • B:先写 Redshift 没必要,训练仍需合适输入,新增数仓复杂度。
  • C:Streams 仅记录变化,Lambda 不能按普通文件追加方式修改 S3 天气对象,时间 join 也没解决。
  • D(正确):Glue 目录与 ETL 合并后写 S3,直接形成 SageMaker 可用训练输入,最低额外平台需求。

放到具体场景里

教学例子:把 sensor timestamp 和天气 observation time 都转 UTC,按站点与时间窗口关联。保留缺天气标记,避免用未来天气预测过去土壤状态造成泄露;输出 CSV 的标签列与算法要求一致。爬虫能识别字段不代表两表 join 一定正确。

检查对象本例条件或动作结果与边界
来源DynamoDB + S3读取完整训练基线
关联站点 + 时间窗口防未来信息泄露
输出S3 CSV核对算法格式

遇到同类题的判断顺序

  1. 读取基线:目录与源权限配置。
  2. 统一时间:UTC 和窗口规则。
  3. 生成样本:正确 join 与标签。
  4. 写出校验:行数、缺失率和格式通过。
结论:训练数据拼接最难的是时间和标签语义,不是把两份文件放到一起。

参考资料

继续练这门考试

同一门考试的免费试练题都附这样的完整讲解,做完再看讲解。