i'm using dynamodb through python (boto3), trying perform simple table scan keep getting 0 results. when i'm trying use same scan filter on aws console, returns correct # of results..
my request code:
response = table.scan( filterexpression=attr('datetime').eq(1453630770) )
note: "datetime" attribute number type
note2: table scan without params yielded results correctly
what did wrong? duders
okay, found answer - apparently i've reached max response size (large objects) , fixed iterating dynamodb table using 'lastevaluatedkey'
a few rounds of scans yielded results properly.
while 'lastevaluatedkey' in response: response = table.scan( projectionexpression=pe, filterexpression=fe, expressionattributenames= ean, exclusivestartkey=response['lastevaluatedkey'] )
more info here: http://docs.aws.amazon.com/amazondynamodb/latest/gettingstartedguide/gettingstarted.python.04.html
hope find helpful.
Comments
Post a Comment