I have a Dynamo DB table which has a primary key as well as a secondary index (routeId). I need to retrieve records containing the secondary index. However, I need to get results for multiple routeId values in a single run. Any way to do it?
Asked
Active
Viewed 116 times
0
-
No you cannot read multiple items in a single query from secondary index. You can however do it from the base table in signle query using `batchGet`. – Prakash Sharma Jul 18 '18 at 08:11
-
@PrakashSharma Can batchGet used for the secondary index? It can only be used with the primary key, right? – Eranga Heshan Jul 18 '18 at 08:45
-
Yeah thats what i said. You cannot use `batchGet` on secondary indexes. You can only use it on base table. – Prakash Sharma Jul 18 '18 at 08:59