Suppose I have the following object on DynamoDB. This object is a map of maps, where each nested map represents an issue. The key value pair of the nested maps represent issueId:issueDetails. Now suppose there are 100s of issues (that are ever-growing or decreasing), and I only want to grab the status & criticality of each issue. How do I go about doing so?
{
"issues": {
"ISU000000000": {
"impactOn": "Balance Sheets",
"issueName": "TestIssue",
"criticality": "High",
"status": "open"
},
"ISU000000001": {
"impactOn": "Balance Sheets",
"issueName": "TestIssue",
"criticality": "High",
"status": "open"
},
"ISU000000002": {
"impactOn": "Balance Sheets",
"issueName": "TestIssue",
"criticality": "High",
"status": "open"
}
}
}
I understand that you can write a projection expression on DynamoDB with attribute names and values like this:
ProjectionExpression = "issues.#IssueID.criticality, issues.#IssueID.status"
ExpressionAttributeNames = {'#IssueID':'ISU000000000'}
But the thing is, in this approach I've declared the IssueID in the ExpressionAttributeNames parameter. So that means, with this approach, I'd have to declare all the IssueIDs beforehand. Is there a way to write an expression such that I don't have to declare the issueID? The end goal is to be able to grab the above-mentioned desired information in an object that dynamically changes in size (meaning issues will be added or deleted).
Note, I'm using the Boto3 SDK
Does my question make sense? Please let me know your thoughts.