Soham Bhagwat
04/28/2026, 2:42 PMkapa.ai
04/28/2026, 2:42 PM{{ stream_interval.start_time }} — represents the start of the current sync time window
• {{ stream_interval.end_time }} — represents the end of the current sync time window
• {{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }} — represents the current UTC datetime (useful for setting a dynamic end date)
[Incremental sync example] Example Setup (GET request with query parameters) In the incremental sync configuration:
• Set "Start datetime" to {{ config['start_time'] }} (user-defined input)
• Set "End datetime" to {{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }} (always syncs up to now)
• Set "Inject start time" to request_parameter with the appropriate field name (e.g., from-date)
• Set "Inject end time" to request_parameter with the appropriate field name (e.g., to-date)
[Incremental sync example] Example Setup (POST request with body parameters) If you need to inject dates into a POST request body, disable the built-in inject options and use the generic parameter section instead:
Field Name: startDate
Value: {{ stream_interval.start_time }}
Field Name: endDate
Value: {{ stream_interval.end_time }}
[Dynamic date filling] How State Works After each sync, Airbyte saves the most recent cursor date as the connection's state. The next scheduled sync automatically picks up from that cutoff date — so you don't need to manually update the start date each time. [Incremental sync example] Limitations • Airbyte does not natively support subtracting a fixed number of days (e.g., "current day minus 1") directly within the Connector Builder configuration. As a workaround, you could use the "Update Source" API endpoint to programmatically pass a new start date before each sync run. [Forum: Dynamic Start Date] 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.Soham Bhagwat
04/28/2026, 2:43 PMkapa.ai
04/28/2026, 2:43 PM{{ config['start_time'] }} as a user input, so the user can specify how far back to go). [Incremental sync]
2. Set the "End datetime" to now (or {{ now_utc().strftime('%Y-%m-%dT%H:%M:%SZ') }}) to sync all data up to the current date. [Incremental sync example]
3. Enable "Split up interval" (under Advanced settings) and set a Step (e.g., P1D for daily chunks). This partitions the backfill into smaller requests, which is important for APIs with rate limits or date-range restrictions. [Adding incremental reads] How State Prevents Re-fetching Once the backfill completes, Airbyte saves the most recent cursor value as the connection's state. Subsequent syncs will automatically start from that cutoff point — so the backfill only happens once, and future syncs only pull new/changed data. [Incremental sync example] Testing Note During testing in the Connector Builder, at most 5 partitions are requested to speed things up. During a real sync, the full time range between your configured start date and the current day will be executed. [Adding incremental reads] 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.Soham Bhagwat
04/28/2026, 2:44 PMkapa.ai
04/28/2026, 2:44 PMfrom airflow import DAG
from airflow.utils.dates import days_ago
from airflow.providers.airbyte.operators.airbyte import AirbyteTriggerSyncOperator
with DAG(
dag_id="trigger_airbyte_sync",
default_args={"owner": "airflow"},
schedule_interval="@daily",
start_date=days_ago(1),
) as dag:
sync_connection = AirbyteTriggerSyncOperator(
task_id="sync_airbyte_connection",
connection_id="your-airbyte-connection-uuid",
timeout=3600,
wait_seconds=3,
) Asynchronous (uses a sensor, lighter on resources) from airflow import DAG
from airflow.utils.dates import days_ago
from airflow.providers.airbyte.operators.airbyte import AirbyteTriggerSyncOperator
from airflow.providers.airbyte.sensors.airbyte import AirbyteJobSensor
with DAG(
dag_id="trigger_airbyte_sync_async",
default_args={"owner": "airflow"},
schedule_interval="@daily",
start_date=days_ago(1),
) as dag:
trigger_sync = AirbyteTriggerSyncOperator(
task_id="trigger_airbyte_sync",
connection_id="your-airbyte-connection-uuid",
asynchronous=True,
)
wait_for_sync = AirbyteJobSensor(
task_id="wait_for_airbyte_sync",
airbyte_job_id=trigger_sync.output,
)
trigger_sync >> wait_for_sync
[DAG examples]
The asynchronous approach is recommended if your Airflow instance has limited resources, as sensors don't occupy a worker slot. [DAG examples]
> Note: The connection_id is the Airbyte Connection UUID, which you can find in the URL when viewing a connection in the Airbyte UI. 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.Soham Bhagwat
04/28/2026, 2:49 PMkapa.ai
04/28/2026, 2:50 PMfrom airflow import DAG
from airflow.utils.dates import days_ago
from airflow.providers.airbyte.operators.airbyte import AirbyteTriggerSyncOperator
with DAG(
dag_id="trigger_airbyte_backfill",
default_args={"owner": "airflow"},
schedule_interval="@daily",
start_date=days_ago(1),
) as dag:
backfill_sync = AirbyteTriggerSyncOperator(
task_id="airbyte_backfill",
connection_id="your-airbyte-connection-uuid",
timeout=3600,
wait_seconds=3,
)
[DAG examples]
Airflow will trigger the Airbyte job, and Airbyte will handle the backfill based on its configured start date and state. Once the backfill completes, subsequent syncs will automatically pick up from the last cursor value saved in Airbyte's state.
> Note: The knowledge sources do not describe a way to dynamically pass a custom start date from Airflow to Airbyte at trigger time. If you need that level of control, you would need to update the Airbyte connection's configuration (e.g., via the Airbyte API) before triggering the sync. 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.