<@U04S8PLJWMT> how to add a smaller checkpoint int...
# ask-ai
m
@kapa.ai how to add a smaller checkpoint interval for airbyte cloud builder yaml config
k
To set a smaller checkpoint interval in an Airbyte Cloud Builder YAML config, you need to adjust the
state_checkpoint_interval
property for your stream. This property controls how often Airbyte saves the state during incremental syncs—specifically, it saves state after every N records. For example, to checkpoint every 10 records, you would set:
Copy code
yaml state_checkpoint_interval: 10
This property should be set within the stream configuration. Note that this method requires that your records are output in ascending order with respect to the cursor field. If your records are not ordered, you should consider using stream slicing instead, which allows for more granular control over when state is checkpointed by dividing the sync into logical slices (e.g., by day, hour, etc.) and saving state after each slice is processed. Here’s a conceptual example for a YAML-based config:
Copy code
yaml streams:   - name: my_stream     ...     state_checkpoint_interval: 10
If you are using the Connector Builder UI, look for the "Advanced settings" or "Incremental sync" section, where you can set the checkpoint interval or configure stream slicing for finer control. For more advanced use cases, such as protecting against intermittent failures or handling large datasets, you may want to use the "Split Up Interval" (stream slicing) feature, which saves state after each time-based chunk is processed. This is especially useful if you want to minimize data reprocessing in case of sync failures. The default step size is typically one month, but you can set it to a smaller value (e.g., one day) as needed using ISO 8601 durations like
P1D
for one day or
PT1H
for one hour [Incremental sync - Advanced settings](https://docs.airbyte.com/platform/next/connector-development/connector-builder-ui/incremental-sync#advanced-settings). If you do not see the state being updated as expected, ensure your connector outputs records in the correct order and that the interval is set correctly. If you need more granular control, use stream slicing as described above [Checkpointing state](https://docs.airbyte.com/platform/next/connector-development/cdk-python/incremental-stream#checkpointing-state). Summary: - Set
state_checkpoint_interval
in your stream config for interval-based checkpointing. - Use stream slicing ("Split Up Interval") for time-based or more granular checkpointing. - Both options are available in YAML and the Connector Builder UI under advanced/incremental sync settings.