Skip to content

ReadMe -- Query PartitionKey using begins_with? #105

Open
@whieronymus

Description

@whieronymus

In your example on the Readme:

# Query based on the keys
Book.query(isbn__begins_with="12345")

As far as I know, you cannot use a query on a DyanmoDB table without using an exact match on Partition(Hash) Key.
https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Query.html
How are you using isbn__begins_with="12345" here?

I tried a similar example locally and I get the following Boto3 error:
botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the Query operation: Query key condition not supported

Is this a bug? If not, why does it work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions