Hey, I am building a connector using the low code ...
# help-connector-development
r
Hey, I am building a connector using the low code connection builder. I am using "Cursor Pagination" and understand how to configure the cursor value like
{{ last_records[-1]['id'] }}
. Now I would like to use the actual cursor value in a custom Request Body parameter with key "query". The value of this request body parameter would be something like:
Copy code
select id, ..., ... from table where id > {{ cursor_value }} order by id
I am not sure in which variable the actual cursor value would be stored or how I can find out. Can you please point me in the right direction? For incremental syncs I am already using
{{ stream_slice['start_date'] }}
and
{{ stream_slice['end_date'] }}
succesfully in the same way.
k
A message from kapa.ai
Based on the information extracts provided, I don't have enough details to give you a confident answer on how to use the actual cursor value in a custom Request Body parameter with key "query". However, I can provide you with some information on how the cursor value is used in the pagination strategy. In the case of
CursorPagination
, the cursor value is output by evaluating its
cursor_value
string with the following parameters: - `response`: The decoded response - `headers`: HTTP headers on the response - `last_records`: List of records selected from the last response This cursor value can be used to request the next page of records [source](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/pagination). For more information on pagination and incremental syncs, you can refer to the following documentation: - [Pagination](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/pagination) - [Incremental Syncs](https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/incremental-syncs)
r
Found it! I should use
{{ next_page_token['next_page_token'] }}
It's working with:
Copy code
select * from table where id > {{ next_page_token['next_page_token'] or 0 }} order by id
Source: https://docs.airbyte.com/connector-development/config-based/understanding-the-yaml-file/reference/#/variables/next_page_token
🎉 1