I am new to DynamoDb stuff. I just want to know how can we query on a table in DynamoDB with the hashKey and rangeKey.
Let's say my Table is TestTable and it's schema is something like this:
1.Id (HK of type String)
2 Date (RK of type String )
3 Name (attribute of type String)
Now If I want to query on this table on the basis of hashKey which is Id here, we make a query as :
Let's say my query is to get all Items having Id ="123".
TestTable testTable = new TestTable();
testTable.setId("123");
DynamoDBQueryExpression<TestTable> queryExpression = new DynamoDBQueryExpression<TestTable>()
.withHashKeyValues(TestTable)
.withConsistentRead(false);
Now I want to get all Items having Id ="123" and Date ="1234".
How can I query this thing in DynamoDB
I am using java as my programming language.