Tdl 12607 add page size as a configurable property#73
Tdl 12607 add page size as a configurable property#73prijendev wants to merge 7 commits intoadhoc-crest-masterfrom
Conversation
tap_google_analytics/__init__.py
Outdated
| to sync to generate the required reports. | ||
| """ | ||
| selected_streams = catalog.get_selected_streams(state) | ||
| # If page_size found in config then used it else use default page size. |
There was a problem hiding this comment.
| # If page_size found in config then used it else use default page size. | |
| # If page_size is found in config then use it, else use the default page size. |
kspeer825
left a comment
There was a problem hiding this comment.
This needs test coverage around the new configurable property:
- Can the tap handle types that are not int?
- What happens if I pass in a page size of zero?
- Does the tap actually fall back to the default and perform functionally?
We have updated the code to handle different values of the |
| primary_keys_page_1 = set(primary_keys_list_1) | ||
| primary_keys_page_2 = set(primary_keys_list_2) | ||
|
|
||
| # Verify by primary keys that data is unique for page |
There was a problem hiding this comment.
Could you update this validation to ensure all pages are unique rather than the first 2, see example here https://github.com/singer-io/tap-mixpanel/blob/2cf3a86231da042f76f4e3ef9fa8c23600b6f593/tests/tap_tester/test_all_fields_pagination.py#L134-L153
There was a problem hiding this comment.
Updated pagination test case.
| # Revert back page size to 1000 for other test cases. | ||
| self.PAGE_SIZE = 1000 |
There was a problem hiding this comment.
Why is the page size changed here? And could you update this test to cover a larger page size than 1 so that we are validating multiple records per page?
There was a problem hiding this comment.
We have updated the page size to 2 for a pagination test case. Smaller page size takes a long time to complete the sync. So, here we are using a smaller page size just for the pagination test case, and for the rest of the test cases, we are reverting back it to 1000.
| # @staticmethod | ||
| # def name(): | ||
| # return "tap_tester_google_analytics_pagination_test" | ||
| # TODO https://stitchdata.atlassian.net/browse/SRCE-5084 |
There was a problem hiding this comment.
This seems to be an old link (old JIRA environment).
Is there a new JIRA associated with it, if not can we remove this ?
There was a problem hiding this comment.
@cosimon @kspeer825 Should we remove such a Jira link from the tap-tester? We are not sure whether it is an old Jira link or not because it is not accessible to us.
Description of change
page_size.QA steps
page_sizeparameter in the config and verify that tap calls the API with the given pagination parameter.page_sizeparameter is not provided then tap consider defaultpage_size1000.Risks
Rollback steps