
Airbyte Connections Sync
CertifiedRun an Airbyte connection sync
Airbyte Connections Sync
Run an Airbyte connection sync
Starts a sync for an Airbyte connection and, by default, waits for the job to finish. Polling runs every second for up to 60 minutes unless you change pollFrequency or maxDuration. If a sync is already running for the connection, the task adopts it and polls it to completion instead of failing or blindly re-triggering — see onActiveSync.
When the job ends in any state other than SUCCEEDED, the task fails but keeps its outputs (job, attempts, metadata, ...), so errors and finally branches can read them. Set onPartialSuccess: WARNING to end in WARNING instead when the job failed after committing records.
The task also exposes the connection that ran the job, a connectionSnapshot file (connector configurations are never included) and a jobUrl to the job logs in the Airbyte web app. When Kestra runs with assets enabled (Enterprise Edition), each replicated stream that committed records is emitted as a table asset with the source stream as its input. Assets are emitted only when the task ends in SUCCESS or WARNING, because Kestra drops the assets of a failed task run, and their counts are the same per-stream figures as metadata, so a job that ended in WARNING emits no asset
type: io.kestra.plugin.airbyte.connections.SyncExamples
Trigger an Airbyte sync and wait for completion
id: airbyte_sync
namespace: company.team
tasks:
- id: sync
type: io.kestra.plugin.airbyte.connections.Sync
url: http://localhost:8080
connectionId: e3b1ce92-547c-436f-b1e8-23b6936c12cd
- id: log_rows_synced
type: io.kestra.plugin.core.log.Log
message: "Rows synced: {{ outputs.sync.metadata.rowsSynced }}"
Trigger a single Airbyte sync on schedule
id: airbyte_sync
namespace: company.team
tasks:
- id: data_ingestion
type: io.kestra.plugin.airbyte.connections.Sync
connectionId: e3b1ce92-547c-436f-b1e8-23b6936c12ab
url: http://host.docker.internal:8000/
username: "{{ secret('AIRBYTE_USERNAME') }}"
password: "{{ secret('AIRBYTE_PASSWORD') }}"
triggers:
- id: every_minute
type: io.kestra.plugin.core.trigger.Schedule
cron: "*/1 * * * *"
Fail immediately instead of adopting an already running sync
id: airbyte_sync_fail_on_active
namespace: company.team
tasks:
- id: sync
type: io.kestra.plugin.airbyte.connections.Sync
url: http://localhost:8080
connectionId: e3b1ce92-547c-436f-b1e8-23b6936c12cd
onActiveSync: FAIL
Handle a failed sync and tolerate partial success
id: airbyte_sync_with_error_handling
namespace: company.team
tasks:
- id: sync
type: io.kestra.plugin.airbyte.connections.Sync
url: http://localhost:8080
connectionId: e3b1ce92-547c-436f-b1e8-23b6936c12cd
onPartialSuccess: WARNING
errors:
- id: alert
type: io.kestra.plugin.core.log.Log
level: ERROR
message: |
Airbyte job {{ outputs.sync.jobId }} ended {{ outputs.sync.job.status }}:
{{ outputs.sync.job.failures[0].externalMessage ?? 'no failure message reported' }}
Logs: {{ outputs.sync.jobUrl }}
Installation
Our standard Docker images already include this plugin. If you use a -slim image or another setup, install it with the following command:
kestractl plugins get io.kestra.plugin:plugin-airbyte --compatible-for $KESTRA_VERSION For Kestra CLI, replace LATEST with a specific version or version range to pin the plugin version. For kestractl, use your Kestra version with --compatible-for, or specify an exact plugin version.
Properties
connectionId *string
Connection ID
Airbyte connection ID to sync
url *string
Airbyte API URL
Base URL of the Airbyte instance to call. This value is rendered from the current run context
applicationCredentials
Application credentials
Client credentials used to request an Airbyte application access token from /api/v1/applications/token. Use this instead of a static token when Airbyte application authentication is enabled
io.kestra.plugin.airbyte.AbstractAirbyteConnection-ApplicationCredentials
Client ID
Airbyte application client ID
Client secret
Airbyte application client secret. Store this value in a Secret
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150maxDuration string
PT1HMaximum wait duration
Maximum total time to wait when wait is enabled. Defaults to 60 minutes. When a job is adopted from an already running sync, this duration is counted from the moment it is adopted, not from the job's actual start time
onActiveSync string
ADOPTADOPTFAILSKIPBehavior when a sync is already running
Controls what happens when a sync is already running for this connection. A job that is pending, queued, running or incomplete counts as an active sync:
ADOPT(default): attach to the in-flight job and poll it to completion instead of triggering a new sync.FAIL: fail the task immediately.SKIP: succeed immediately without waiting, withalreadyRunningset totrueand nojobId.
onPartialSuccess string
FAILFAILWARNINGBehavior on partial success
Controls what happens when the job ends FAILED but at least one attempt committed records (Airbyte's partialSuccess). Only applies when wait is enabled:
FAIL(default): fail the task.WARNING: end the task inWARNINGand return the outputs. Any other non-successful outcome always fails the task.
options
HTTP client options
HTTP client configuration applied to Airbyte API requests
io.kestra.core.http.client.configurations.HttpConfiguration
falseIf true, allow a failed response code (response code >= 400)
List of response code allowed for this request
The authentication to use.
io.kestra.core.http.client.configurations.BasicAuthConfiguration
The password for HTTP basic authentication.
The username for HTTP basic authentication.
io.kestra.core.http.client.configurations.BearerAuthConfiguration
The token for bearer token authentication.
io.kestra.core.http.client.configurations.DigestAuthConfiguration
The password for HTTP Digest authentication.
The username for HTTP Digest authentication.
UTF-8The default charset for the request.
java.nio.charset.Charset
trueWhether to enable TCP Keep-Alive extended socket options (TCP_KEEPIDLE, TCP_KEEPINTERVAL, TCP_KEEPCOUNT).
Set to false when running on Windows workers, as these extended socket options are not supported by the Windows JDK and will cause connection failures.
trueWhether redirects should be followed automatically.
REQUEST_HEADERSREQUEST_BODYRESPONSE_HEADERSRESPONSE_BODYThe enabled log.
The proxy configuration.
io.kestra.core.http.client.configurations.ProxyConfiguration
The address of the proxy server.
The password for proxy authentication.
The port of the proxy server.
DIRECTDIRECTHTTPSOCKSThe type of proxy to use.
The username for proxy authentication.
Retry strategy for HTTP requests.
retry is disabled by default.
Constant retry
Retry with a fixed delay between attempts.
durationRETRY_FAILED_TASKRETRY_FAILED_TASKCREATE_NEW_EXECUTION>= 1durationfalseExponential retry
Retry with exponentially increasing delays between attempts.
durationdurationRETRY_FAILED_TASKRETRY_FAILED_TASKCREATE_NEW_EXECUTION>= 1durationfalseRandom retry
Retry with a random delay within a configurable range between attempts.
durationdurationRETRY_FAILED_TASKRETRY_FAILED_TASKCREATE_NEW_EXECUTION>= 1durationfalse[502,503,504]HTTP status codes that should be retried.
Used for idempotent methods (GET, HEAD) without their own entry in retryOnStatusCodesByMethod. Non-idempotent methods are never retried on a status code unless listed in retryOnStatusCodesByMethod. Defaults to 502, 503 and 504 for idempotent methods (GET, HEAD) only.
Per-HTTP-method overrides for which status codes should be retried.
Keys are HTTP methods (e.g. GET, POST). A method with no entry here falls back to retryOnStatusCodes. This lets a caller retry more broadly for safe, read-only methods (for example, every 5xx and a 429 for GET/HEAD) while keeping a narrower list for methods that write, where retrying a request that may have already been processed by the origin risks duplicating the effect. Example: {GET: [429, 500, 502, 503, 504], HEAD: [429, 500, 502, 503, 504]}.
["GET","HEAD"]HTTP methods for which any transport-level failure may be retried.
A transport-level failure is a connection or timeout error rather than an HTTP response (e.g. a read timeout or a connection reset mid-request). For a method listed here, any such failure is retried. Defaults to GET and HEAD HTTP methods.
The SSL request options
io.kestra.core.http.client.configurations.SslOptions
Whether to disable checking of the remote SSL certificate.
Only applies if no trust store is configured. Note: This makes the SSL connection insecure and should only be used for testing. If you are using a self-signed certificate, set up a trust store instead.
The timeout configuration.
io.kestra.core.http.client.configurations.TimeoutConfiguration
The time allowed to establish a connection to the server before failing.
PT5MThe time allowed for a read connection to remain idle before closing it.
password string
Basic auth password
Password for Airbyte basic authentication. Store this value in a Secret
pollFrequency string
PT1SPoll frequency
Interval between status checks while waiting for the job to finish. Defaults to 1 second
token string
Bearer token
Bearer token used for Airbyte API requests. This value is rendered from the current run context
username string
Basic auth username
Username for Airbyte basic authentication. If both basic auth and a bearer token are configured, basic auth is sent last and takes precedence
wait booleanstring
trueWait for completion
If true, wait for the Airbyte job to reach a terminal state before the task completes. Defaults to true
webappUrl string
Airbyte web app URL
Base URL of the Airbyte web app, used to build the jobUrl output. Defaults to url. Set it when the web app is served from a different address than the API
Outputs
adopted boolean
Adopted
Whether jobId refers to a sync that was already running and got adopted, rather than a sync newly triggered by this task
alreadyRunning boolean
Already running
Whether a sync was already running for the connection, either adopted (onActiveSync: ADOPT) or skipped (onActiveSync: SKIP)
attempts string
uriAttempts file
Internal storage URI of an Ion file with one row per Airbyte attempt. Only available when wait is enabled
Pebble expression referencing an Internal Storage URI e.g. {{ outputs.mytask.uri }}.
connection
Connection
Summary of the connection, source and destination that ran the job. null when their configuration could not be read
Airbyte connection summary
Short, non-secret description of the connection that ran the job
Connection ID
Destination ID
Destination name
Name given to the destination in Airbyte
Destination type
Destination connector type, for example Snowflake
Name
Schedule type
Source ID
Source name
Name given to the source in Airbyte
Source type
Source connector type, for example Postgres
Status
Selected stream count
Number of streams replicated by the connection
Workspace ID
connectionSnapshot string
uriConnection snapshot file
Internal storage URI of a JSON file with the connection, source and destination configuration at the time of the job. Connector configurations are never included. null when it could not be read
Pebble expression referencing an Internal Storage URI e.g. {{ outputs.mytask.uri }}.
job
Job summary
Status, timing, attempt counts and sanitized failure reasons of the Airbyte job. Only available when wait is enabled
Airbyte job summary
Final state of the Airbyte job. The job ID is exposed by the jobId output of Sync
Attempt count
CHECK_CONNECTION_SOURCECHECK_CONNECTION_DESTINATIONDISCOVER_SCHEMAGET_SPECSYNCRESET_CONNECTIONREFRESHCLEARConfig type
Kind of job, for example sync
date-timeCreated at
durationDuration
Time between the job start and the end of its last attempt. Templates render it as a number of seconds, for example 31.0
date-timeEnded at
End time of the last attempt
Failed attempt count
Failures
Sanitized failure reasons of every attempt
Airbyte failure reason
Sanitized failure reason of an Airbyte attempt. Internal messages and stack traces are never kept
External message
User-facing failure message, truncated to 2 KiB
SOURCEDESTINATIONREPLICATIONPERSISTENCENORMALIZATIONDBTAIRBYTE_PLATFORMUNKNOWNOrigin
Airbyte component that failed, for example source or destination
Retryable
Whether Airbyte considers the failure retryable
Stream
Stream affected by the failure, formatted as namespace.name or name. Absent when the failure is not tied to a stream
CONFIG_ERRORSYSTEM_ERRORMANUAL_CANCELLATIONREFRESH_SCHEMAHEARTBEAT_TIMEOUTDESTINATION_TIMEOUTTRANSIENT_ERRORType
Failure category reported by Airbyte, for example config_error or system_error
Partial success
true when at least one attempt committed records before failing
date-timeStarted at
PENDINGQUEUEDRUNNINGINCOMPLETEFAILEDSUCCEEDEDCANCELLEDStatus
Terminal job status
jobId integer
Job ID
Airbyte job ID for the sync. Set for every outcome except onActiveSync: SKIP, whether the job was newly triggered or adopted from an already running sync
jobUrl string
Job URL
Link to the job logs in the Airbyte web app, built from webappUrl or url. null when the workspace could not be resolved
metadata
Sync metadata
Rows synced and source and destination tables affected by the completed Airbyte job. Only available when wait is enabled
Airbyte sync metadata
Bytes synced
Total number of bytes committed to the destination. Absent when Airbyte does not report per-stream committed bytes
Destination tables
Destination streams affected by the sync and the number of records committed to each one. Contains one entry per stream returned by Airbyte, so its size follows the connection's stream count
Airbyte table sync metadata
Bytes processed
Bytes emitted by the source, or committed to the destination
Table name
Table namespace
Records rejected
Records rejected by the destination. Only set on destination tables
Rows processed
Records rejected
Total number of records the destination rejected. Absent when Airbyte does not report rejected records
Rows synced
Total number of records committed to the destination
Source tables
Source streams affected by the sync and the number of records emitted from each one. Contains one entry per stream returned by Airbyte, so its size follows the connection's stream count
Airbyte table sync metadata
Bytes processed
Bytes emitted by the source, or committed to the destination
Table name
Table namespace
Records rejected
Records rejected by the destination. Only set on destination tables
Rows processed
Metrics
attempts.count counter
attemptNumber of attempts made during the Airbyte sync (emitted when wait is enabled)
attempts.failed counter
attemptNumber of failed attempts during the Airbyte job (emitted when wait is enabled)
bytes.emitted counter
byteNumber of bytes emitted during processing (emitted when wait is enabled)
duration timer
Time between the start of the job and the end of its last attempt (emitted when wait is enabled)
records.committed counter
recordNumber of records successfully committed (emitted when wait is enabled)
records.emitted counter
recordNumber of records emitted during processing (emitted when wait is enabled)
records.rejected counter
recordNumber of records rejected by the destination, tagged by stream (emitted when wait is enabled)
state.emitted counter
messageNumber of state messages emitted (emitted when wait is enabled)