I am new to DynamoDb . I just want to know how we can query a table in DynamoDB using hashKey and rangeKey .
Say my table is TestTable , and this circuit looks 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 in this table based on hashKey , which is Id here, we do a query as:
Let's say my query is to get all the elements 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 the elements with Id ="123" and Date ="1234" .
How can I request this thing in DynamoDb
I use java as my programming language.
java amazon-dynamodb
Geek_To_Learn
source share