

终止支持通知： AWS 将于 2025 年 12 月 15 日终止对的支持 AWS IoT Analytics。2025 年 12 月 15 日之后，您将无法再访问 AWS IoT Analytics 控制台或 AWS IoT Analytics 资源。有关更多信息，请参阅[AWS IoT Analytics 终止支持](https://docs.aws.amazon.com/iotanalytics/latest/userguide/iotanalytics-end-of-support.html)。

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# RemoveAttributes 活动
<a name="pipeline-activities.removeattributes"></a>

`removeAttributes` 活动从消息中删除属性。例如，给定以下消息，它是 `addAttributes` 活动的结果。

```
{
    "device": {
        "id": "device-123",
        "coord": [ 47.6, -122.3 ]
    },
    "id": "device-123",
    "lat": 47.6,
    "lon": -122.3
}
```

为了规范化该消息，使其只包含根级别所需的数据，请使用以下 `removeAttributes` 活动。

```
{
    "removeAttributes": {
        "name": "MyRemoveAttributesActivity",
        "attributes": [
            "device"
        ],
        "next": "MyDatastoreActivity"
    }
}
```

这会产生沿管道流动的以下消息。

```
{
    "id": "device-123",
    "lat": 47.6,
    "lon": -122.3
}
```