<@U04S8PLJWMT> I'm creating a custom connector and...
# ask-ai
c
@kapa.ai I'm creating a custom connector and I'm seeing that Airbyte is adding a
lookback_window
of
32243
into the state that was not specified. Can this be changed?
k
The knowledge sources indicate that the lookback window is a configuration parameter used in incremental syncs to re-fetch data from a specified period before the last sync, which helps capture updates to records that cannot be filtered by modification date. The value of the lookback window can be set in the connector configuration, and it is typically specified in days or as an ISO8601 duration (e.g., P1D for one day) depending on the connector implementation. However, there are reports (such as with the Amazon Ads connector) where the lookback window value in the state can become unexpectedly large (e.g., 513, 1900, or even 8022), and manual edits to the state (via the UI or API) do not persist, as the next sync overwrites the edited value. This suggests that, for some connectors, the lookback window in the state is managed internally by the connector logic and may not be directly controllable by editing the state alone. Instead, it is recommended to set the lookback window in the connector's configuration, if supported, rather than trying to edit the state directly. If the connector does not respect the configuration or continues to overwrite the value, this may be a bug or limitation in the connector implementation, as seen in the Amazon Ads connector issue. In such cases, a workaround is to adjust the start date or use automation to reset the state, but a proper fix would require changes to the connector code itself or a bugfix from the Airbyte team or community contributors [Amazon Ads connector incremental sync not working](https://github.com/airbytehq/airbyte/issues/54649). In summary: - The lookback window should be set in the connector configuration. - Editing the state directly may not have the desired effect if the connector overwrites it. - If you are seeing unexpected values and cannot change them via configuration or state editing, it may be a connector-specific issue or bug. If you need to control the lookback window, ensure your connector's configuration exposes this parameter and that your connector logic respects it. If not, you may need to review or modify the connector code accordingly.
c
@kapa.ai I created the connector with the connector builder
k
A message from kapa.ai
If you created your connector using the Airbyte Connector Builder, the lookback window is a configurable parameter in the incremental sync settings. The lookback window specifies a duration that is subtracted from the last cutoff date before starting to sync, and it is intended to help capture updates to records that may not be filterable by modification date. You can set this value in the Connector Builder UI when configuring your stream's incremental sync behavior [Lookback window](https://docs.airbyte.com/platform/next/connector-development/connector-builder-ui/incremental-sync#lookback-window). However, if you are seeing an unexpected value like 32243 being added to the state and you did not specify this, the knowledge sources do not provide a direct explanation for this behavior in the context of the Connector Builder. There are known issues in some connectors (outside the builder) where the lookback window in the state can become unexpectedly large and is not easily overridden by manual edits, but there is no explicit documentation about this occurring with custom connectors built in the Connector Builder. What you can do: - Double-check your incremental sync settings in the Connector Builder and ensure the lookback window is set as you intend. - If the issue persists and the value is not coming from your configuration, it may be a bug or an edge case not covered in the documentation. I'm sorry, but the knowledge sources do not contain enough information to explain why a lookback window of 32243 is being added to your connector's state when using the Connector Builder, nor do they describe a direct way to change it if it is not set in your configuration. If this is blocking your work, consider raising an issue with the Airbyte team or community for further investigation. For more on how the lookback window is intended to work in the Connector Builder, see the official documentation: [Lookback window in Connector Builder](https://docs.airbyte.com/platform/next/connector-development/connector-builder-ui/incremental-sync#lookback-window).