Friday, 21 April 2017

Secondary Index - ValidationException: The provided starting key is invalid

I use vogels as an object mapper to my DynamoDB, I have a vogels model with the following schema:

Stock: {
   ID: String, (Hash)
   DateUTC: String (Secondary Index) 
 }

if I try to do:

const query = Stock.query('VOD.XLON');

and load all of the items, since I have about 5000 of them:

query.loadAll();
query.exec((err, result) => {});

I get the error:

ValidationException: The provided starting key is invalid.

Is there anything I am doing wrong on my side, or maybe vogels doesn't work well with loading all items that have secondary indices?



via inside

No comments:

Post a Comment