Darko Macoritto
08/20/2025, 2:35 PMkapa.ai
08/20/2025, 2:35 PM/api/v1/connections/sync endpoint with your connection ID. Here’s an example of how you might do this with a cron job (the same approach applies in Airflow using an HTTP operator): bash 0 0 * * 0 curl -X POST http://localhost:8000/api/v1/connections/sync \ -H "Content-Type: application/json" \ -d '{"connectionId": "<your-connection-id>"}' [[Forum: Custom Replication/Sync Time](https://discuss.airbyte.io/t/379)] Summary: - Use append mode for regular syncs. - Trigger a "Refresh Sync" via the Airbyte API once a week. - Orchestrate the weekly refresh using Airflow by calling the Airbyte API. This approach gives you flexibility to append data most of the time, but also periodically refresh the entire stream as needed.Darko Macoritto
08/20/2025, 2:37 PMDarko Macoritto
08/20/2025, 2:37 PMkapa.ai
08/20/2025, 2:37 PMkapa.ai
08/20/2025, 2:38 PMpython from airflow import DAG from airflow.utils.dates import days_ago from airflow.providers.airbyte.operators.airbyte import AirbyteTriggerSyncOperator with DAG( dag_id='airbyte_weekly_full_refresh', default_args={'owner': 'airflow'}, schedule_interval='@weekly', # This sets the DAG to run once a week start_date=days_ago(1) ) as dag: full_refresh_sync = AirbyteTriggerSyncOperator( task_id='airbyte_full_refresh', airbyte_conn_id='airbyte_conn_example', # Name of your Airflow HTTP connection to Airbyte connection_id='YOUR_AIRBYTE_CONNECTION_ID', # Replace with your Airbyte connection ID asynchronous=False, timeout=3600, wait_seconds=3 ) Instructions: - Replace 'airbyte_conn_example' with the name of your Airflow HTTP connection pointing to your Airbyte API. - Replace 'YOUR_AIRBYTE_CONNECTION_ID' with your actual Airbyte connection ID. - Place this file in your Airflow /dags directory. This DAG will trigger a sync for the specified Airbyte connection once a week. If you want to ensure a full refresh, make sure your Airbyte connection is set to "Full Refresh" mode in the Airbyte UI or API [[Airflow Operator Guide](https://docs.airbyte.com/platform/operator-guides/using-the-airflow-airbyte-operator#2-create-a-dag-in-apache-airflow-to-trigger-your-airbyte-job)]. If you need to trigger a different sync mode (e.g., incremental most of the time, full refresh only weekly), you would need to adjust the Airbyte connection's sync mode via the Airbyte API before triggering the sync, but the knowledge sources do not provide a direct example of dynamically changing sync modes via the API in a DAG. References: - [Airbyte Airflow Operator Guide](https://docs.airbyte.com/platform/operator-guides/using-the-airflow-airbyte-operator#2-create-a-dag-in-apache-airflow-to-trigger-your-airbyte-job) - [Forum: Custom Replication/Sync Time](https://discuss.airbyte.io/t/379)