Shreepad Khandve
03/28/2023, 6:41 PMConor Barber (Airbyte)
03/28/2023, 6:42 PMBrian Lai (Airbyte)
03/28/2023, 6:46 PMShreepad Khandve
03/28/2023, 6:53 PMBrian Lai (Airbyte)
03/28/2023, 6:58 PMrecords -> cursor . https://github.com/airbytehq/airbyte/blob/8ff26a38a1a89a2d9e1214c43715477f0a89327d[…]e-integrations/connectors/source-gong/source_gong/manifest.yaml
Does this fit w/ your use case?Brian Lai (Airbyte)
03/28/2023, 6:59 PMtaking the next page but its not stoping at one pointDo you need it to stop at a certain point? I’m curious for this use case because stopping early would mean we’re not fully extracting the data set
Shreepad Khandve
03/28/2023, 7:13 PM{..............."links": {"next": "<https://iteratehq.com/api/v1/surveys/5d6e82a775b0********/responses?access_token=*********&page[cursor]=5d6f14e2b27070798fab757d>"}}, "emitted_at": 1680030710894}}
paginator -
paginator:
type: DefaultPaginator
pagination_strategy:
type: "CursorPagination"
cursor_value: "{{ response.links.next }}"
stop_condition: "{{ 'links' in response }}"Brian Lai (Airbyte)
03/28/2023, 7:16 PMstop_condition be "{{ 'links' not in response }}"? The way it is written we stop pagination when we see that response has a links field instead of continuingShreepad Khandve
03/28/2023, 7:20 PM{
"status": {
"code": 200,
"message": "ok"
},
"pagination": {
"page": 5,
"count": 10,
"total": 5191
},
"products": [ ...........}
Paginator - (here i was talking about the iteration of next page is working but its bot stoping after fetching all records .)
paginator:
# type: NoPagination
type: "DefaultPaginator"
page_size_option:
type: "RequestOption"
inject_into: "request_parameter"
field_name: "count"
pagination_strategy:
type: "PageIncrement"
page_size: 1
page_token_option:
type: "RequestOption"
inject_into: "request_parameter"
field_name: "page"Brian Lai (Airbyte)
03/28/2023, 7:32 PMpage_size supposed to be one? that field is supposed to be the number of items per page. it is possible for it to be one, but generally uncommon since most apis return anywhere from 10 to 100ish records per responseBrian Lai (Airbyte)
03/28/2023, 7:33 PMhere i was talking about the iteration of next page is working but its bot stoping after fetching all recordsIs there a certain output you’re seeing that is indicating that it is not stopping? What does the responses look like
Shreepad Khandve
03/28/2023, 7:36 PMShreepad Khandve
03/28/2023, 7:40 PMBrian Lai (Airbyte)
03/28/2023, 7:45 PMpage_size . We could just always be receiving the final record and keep on paginating. This is my initial though, do you by chance have any API docs?Brian Lai (Airbyte)
03/28/2023, 7:48 PMWhen i keep page_size = 1, the page number is iterating from page 1, 2 , 3 n so on.This part I’m not sure of. Based on your description, we should definitely be setting page_size to 100 or 150. Here is an example: https://github.com/airbytehq/airbyte/blob/8ff26a38a1a89a2d9e1214c43715477f0a89327d[…]grations/connectors/source-zenloop/source_zenloop/manifest.yaml Can you observe the exact request being made to your API? Are you using the connector builder UI or how are you testing your syncs?
Shreepad Khandve
03/28/2023, 7:56 PMShreepad Khandve
03/28/2023, 7:57 PMBrian Lai (Airbyte)
03/28/2023, 7:59 PMShreepad Khandve
03/28/2023, 8:01 PMShreepad Khandve
03/28/2023, 8:07 PMShreepad Khandve
03/28/2023, 8:08 PMBrian Lai (Airbyte)
03/28/2023, 8:09 PMBrian Lai (Airbyte)
03/28/2023, 8:10 PMShreepad Khandve
03/28/2023, 8:14 PMBrian Lai (Airbyte)
03/28/2023, 8:16 PMcount=150&page=1 (1,2… 4) working?Brian Lai (Airbyte)
03/28/2023, 8:16 PMShreepad Khandve
03/28/2023, 8:19 PMShreepad Khandve
03/28/2023, 8:19 PMBrian Lai (Airbyte)
03/28/2023, 8:22 PMShreepad Khandve
03/28/2023, 8:24 PMBrian Lai (Airbyte)
03/29/2023, 4:25 PMShreepad Khandve
03/29/2023, 4:27 PMShreepad Khandve
03/30/2023, 5:23 PMBrian Lai (Airbyte)
03/30/2023, 5:23 PMShreepad Khandve
03/30/2023, 5:25 PMShreepad Khandve
03/30/2023, 7:04 PMpaginator:
type: DefaultPaginator
pagination_strategy:
type: "CursorPagination"
cursor_value: "{{ response.links.next }}"
stop_condition: "{{ 'links' not in response }}"
Thanks !Shreepad Khandve
03/31/2023, 1:58 PMBrian Lai (Airbyte)
04/03/2023, 11:23 PMShreepad Khandve
04/04/2023, 8:51 AMShreepad Khandve
04/20/2023, 1:23 PMBrian Lai (Airbyte)
05/04/2023, 12:29 AM