<@U04S8PLJWMT> i am developing custom connector wi...
# ask-ai
k
@kapa.ai i am developing custom connector with incremental sync. can i set the cursor field to the airbyte_loaded_at field ?
k
Short answer: no. The cursor field for incremental sync must be a field from the source records that indicates when the record was last updated, and the source must support filtering by that field. Airbyte’s protocol resolves the cursor from either a source-defined cursor, a configured cursor_field, or a default_cursor_field—each referring to a field in the source stream schema. Using Airbyte’s destination-side metadata like airbyte_loaded_at as the cursor is not supported by the protocol for incremental reads, since it’s not part of the source records nor filterable at the source API/DB layer (it won’t meet the “filter by cursor” requirement) ([Logic for resolving the Cursor Field](https://docs.airbyte.com/platform/understanding-airbyte/airbyte-protocol#logic-for-resolving-the-cursor-field); [ConfiguredAirbyteStream](https://docs.airbyte.com/platform/understanding-airbyte/airbyte-protocol#configuredairbytestream); [Incremental sync requirements](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/incremental-sync)). Use a source field like updated_at (or equivalent), ensure the API/DB can filter on it, and configure it as the cursor_field. Subsequent syncs will advance from the last emitted cursor value automatically via state ([Incremental sync](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/incremental-sync)).
k
the source donnt have this. can we use airbyte custo transformation to add a {{ today_utc() }} use that as cursor @kapa.ai
k
A message from kapa.ai
Short answer: you can add such a field, but it won’t give you a valid incremental cursor. - You can use Record Selector transformations to add fields (e.g., add a top-level field with a static or interpolated value) to each record ([Record selector – AddFields](https://docs.airbyte.com/platform/connector-development/config-based/understanding-the-yaml-file/record-selector#transformations)). - However, incremental syncs require a cursor that exists in the source records and can be used to filter API responses by time ranges. A synthetic field like {{ now_utc() }} or today_utc() added during extraction isn’t filterable by the source API, so Airbyte can’t use it to fetch “only new since last sync” ([Incremental sync requirements](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/incremental-sync); [Cursor resolution logic](https://docs.airbyte.com/platform/understanding-airbyte/airbyte-protocol#logic-for-resolving-the-cursor-field)). If the source doesn’t expose a suitable cursor and can’t filter by it: - Prefer full refresh with stream slices over time windows (e.g., rolling windows) as a practical alternative ([Forum: no last_modified – use slices](https://discuss.airbyte.io/t/1710); [Overlapping/time-sliced approach](https://discuss.airbyte.io/t/344)). - Using a synthetic cursor is possible technically, but you will re-read the same data each sync because the source can’t filter by that field ([Forum: synthetic timestamp works but re-reads data](https://discuss.airbyte.io/t/471)).
k
@kapa.ai so my source default has this defo which means in order to full refresh from 01012025 for example and today is 08012025 we need to iterate 30x8 requests with parameter search_date incrementing from 0101 to 0801. is there any way to configure this ? param name :
search_date
- Query results by search date. Return historic demographics with the nearest day before the search date. If search_date isn't included to request parameters, the response will set current date as default search date. Historic demographics don't support search_date before 2017-06-01. Format should be YYYY-MM-DD
k
A message from kapa.ai
Yes. In the Connector Builder you can configure an incremental, date-sliced sync that issues one request per day with search_date injected into the request: - Enable Incremental sync. - Set Start datetime (e.g., user input) and End datetime (e.g., now). - Do not inject start/end as query parameters; instead, use the interval variables to set the URL or params. - Open Advanced settings and split the interval: - Step: P1D (one day) - Cursor granularity: P1D (daily) - Inject the slice date into the request as search_date: - If search_date is a query param, set “Inject start time into outgoing HTTP request” to request_parameter and Field = search_date, and reference the slice start via {{ stream_interval.start_time }}; or set the URL/path/params to use {{ stream_interval.start_time }} formatted as YYYY-MM-DD. This makes Airbyte iterate day-by-day (e.g., 2025-01-01 to 2025-01-08) and issue one request per day, which matches your API’s requirement for daily historical queries. You can also tune the “Outgoing datetime format” to %Y-%m-%d so the injected value matches YYYY-MM-DD (supported in “Advanced settings”) ([Incremental sync config and injecting times](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/incremental-sync#configuration); [Example using interval start/end and placeholders](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/incremental-sync#example); [Split up interval with Step and Cursor granularity](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/incremental-sync#advanced-settings); [Tutorial showing daily slices with stream_interval.start_time](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/tutorial#adding-incremental-reads); [Outgoing datetime format and ISO durations (Next docs)](https://docs.airbyte.com/platform/next/connector-development/connector-builder-ui/incremental-sync#advanced-settings)).
k
cools @kapa.ai i couldn't find "split up interval" on incremental sync. where is it ?
k
A message from kapa.ai
In the Connector Builder’s Incremental Sync settings, it’s under Advanced settings: - Open your stream → enable Incremental sync. - Expand Advanced settings and look for “Split up interval” (then set Step and Cursor granularity as ISO 8601 durations, e.g., P1D) ([Advanced settings – Split up interval](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/incremental-sync#advanced-settings); also shown in 1.6/1.7 docs) ([1.6 Advanced](https://docs.airbyte.com/platform/1.6/connector-development/connector-builder-ui/incremental-sync#advanced-settings), [1.7 Advanced](https://docs.airbyte.com/platform/1.7/connector-development/connector-builder-ui/incremental-sync#advanced-settings)).
k
@kapa.ai which mode is that cant find. i have incremental sync toggled. have options "incrementing count cursor", "datetime based cursor", "custom incremental sync"
k
A message from kapa.ai
Use “Datetime based cursor.” That mode exposes the Advanced settings where you can enable “Split up interval” and set Step and Cursor granularity (e.g., P1D) to issue one request per day. The docs’ tutorial/screens show enabling Incremental sync, then in Advanced enable Split up interval for daily slices ([Tutorial – Adding incremental reads](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/tutorial#adding-incremental-reads), [Advanced settings – Split up interval](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/incremental-sync#advanced-settings)).
k
@kapa.ai i am using list partitioned router - is that the root cause cannot split ?
k
A message from kapa.ai
Likely not. List partitioning and incremental time slicing can be used together: define incremental_sync on the Stream and a partition_router (e.g., ListPartitionRouter) on the Retriever. Airbyte will take the Cartesian product of time partitions and list partitions (e.g., for each day × each list value) ([Combining incremental syncs and iterable locations](https://docs.airbyte.com/platform/connector-development/config-based/understanding-the-yaml-file/yaml-overview#combining-incremental-syncs-and-iterable-locations)). If you don’t see “Split up interval,” ensure you’re using a datetime-based incremental configuration. Partitioning shouldn’t disable it; it should combine with it as described above ([Combining incremental syncs and iterable locations](https://docs.airbyte.com/platform/connector-development/config-based/understanding-the-yaml-file/yaml-overview#combining-incremental-syncs-and-iterable-locations); [Advanced settings – Split up interval](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/incremental-sync#advanced-settings)).