- 최신
- 최다 투표
- 가장 많은 댓글
To store each attribute individually, you will need to modify the SQL in your IoT rule to handle each attribute separately.
In your IoT rule, set the SQL statement to the following:
SELECT payload.test1 as test1, payload.test2 as test2, payload.test3 as test3 FROM 'test/topic'
This statement extracts each attribute individually from the payload.
In the action for the rule, select 'Split message into multiple columns of a DynamoDB table (DynamoDBv2)'.
In the 'Configure action' step, select your DynamoDB table and set the Hash key value to your desired key (for example, id).
In the 'Table columns' section, map the incoming payload data to the DynamoDB columns. Use test1, test2, and test3 as the column names and ${test1}, ${test2}, and ${test3} as the values, respectively.
By using this method, the payload from the MQTT message will be split into different attributes in DynamoDB rather than being stored as a map under the payload attribute. Please note that you need to ensure that your DynamoDB table has the appropriate columns (test1, test2, test3) set up for this to work.
관련 콘텐츠
- AWS 공식업데이트됨 일 년 전
- AWS 공식업데이트됨 2년 전
- AWS 공식업데이트됨 3년 전
Thank you for answer. Is DynamoDBv2 only possible? Is this not possible with DynamoDB?