- 최신
- 최다 투표
- 가장 많은 댓글
Hey Stefan,
We got some hints for you from our team. Filter/condition expressions for maps have to have key names at each level of the map specified separately in the expression attributeNames map.
Your expression should look like this:
{
"TableName": "genericPodcast",
"FilterExpression": "#keyone.#keytwo.#keythree = :keyone",
"ExpressionAttributeNames": {
"#keyone": "attributes",
"#keytwo": "playbackInfo",
"#keythree": "episodeGuid"
},
"ExpressionAttributeValues": {
":keyone": {
"S": "podlove-2018-05-02t19:06:11+00:00-964957ce3b62a02"
}
}
}
Hello,
I would like to do it without coding. i would want to scan the dynamodb via the aws console (webinterface of the dynamodb-service).
but additionally i tried it with coding like this:
var params = {
TableName: "genericPodcast",
FilterExpression: "#episodeGuid = :myEpisode",
ExpressionAttributeNames: {
'#episodeGuid': 'attributes.playbackInfo.episodeGuid',
// '#episodeGuid': 'attributes',
},
// ExpressionAttributeValues: { ":myEpisode": { "S": "podlove-2018-12-06t13:07:10+00:00-f8a9b2963f313e5" } }
ExpressionAttributeValues: { ":myEpisode": "podlove-2018-12-06t13:07:10+00:00-f8a9b2963f313e5" }
};
oDynamoDBClient.scan(params, async function (err, data) {
console.log('read return');
if (err) console.log(err, err.stack); // an error occurred
else {
console.log(data);
}
});
With coding i didn't find results. i doesn't get errors, but i also don't get results.
maybe you could help me with both problems.
- how to set the filter to scan items in the aws console (webinterface) without coding
- help me to fix my coding to be able to scan dynamodb programmatically too
Kind Regards
Stefan
Hey Stefan,
You can definitely scan a table through the AWS management console. After you login, go the DynamoDB console and select the table you want to scan. From there, click on the items tab and you should be able to both scan and query the table.
I will ask one of our developer evangelists to look at your code, but in the mean time, have you checked out the docs on scans?
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Scan.html
There may be some hints in there.
I would like to know how to do this through the AWS console too "aws console (webinterface of the dynamodb-service)." I've been looking everywhere I don't know how to do it.
You can do that via PartiQL editor (it's right there in the DynamoDB page).
An example query which worked for me:
select * from "schedules" where data.origin.country = 'United States'
(note the double quotes for the table name and the single quotes for the string)
관련 콘텐츠
- AWS 공식업데이트됨 2년 전
I would like to know how to do this through the AWS console too "aws console (webinterface of the dynamodb-service)." I've been looking everywhere I don't know how to do it.