0

In my Dynamodb table of "batches" with partition key "ID" and "Created_at" as sort key and a GSI with "batch_Status".Given a list of statuses

let's say I would like to query the batches with status as "IN Progress", "NEW", "Completed"

Is there a way to query on GSI with a list of values?

I have done for a single value till now

def retrieve_records():
    response = table.query(IndexName="batch_Status-index", KeyConditionExpression=Key("batch_Status").eq("In Progress"))

Appreciate if you can provide a code snippet for list of values

1 Answer 1

1

Currently there is no way to have execute these queries in a single request. The only way to do this is to execute multiple queries. Latency delay should be minimal. It also gives you the opportunity to do them in parallel, which may speed things a bit.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.