-
Notifications
You must be signed in to change notification settings - Fork 1
[PRMP-1079] Dynamodb query limit doesn't work as expected. #958
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| response = self.dynamo_service.query_table_with_paginator( | ||
| table_name=self.table_name, | ||
| index_name="CustodianIndex", | ||
| key="Custodian", | ||
| condition=ods_code, | ||
| filter_expression=filter_expression, | ||
| expression_attribute_names=condition_attribute_names, | ||
| expression_attribute_values=condition_attribute_values, | ||
| start_key=start_key, | ||
| limit=limit, | ||
| ) | ||
|
|
||
| references = self._validate_review_references(response["Items"]) | ||
| last_evaluated_key = response.get("NextToken") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this should be in DocumentService
| filter_expression, condition_attribute_names, condition_attribute_values = ( | ||
| self.build_paginator_query_filter(nhs_number=nhs_number, uploader=uploader) | ||
| ) | ||
| response = self.dynamo_service.query_table_with_paginator( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DocumentService?
|



Overview
Jira ticket: PRMP-1079
Description
Find another method of returning the expected number of results using a limit and pagination when querying dynamodb
Context
Using a limit along side a filter expression within a dynamodb query doesn't return the number of results as initially expected, the filter is applied after the limit.
Checklist
Tasks for all changes:
I have run git pre-commits.(WIP)[ ] 4. I have updated relevant documentation.Deploy - Sandbox- workflow run - 20331224066-
[ ] 6b.SANDBOX Full- Deploy feature branch to sandbox- workflow run - TBC