
Fivetran Connectors Sync
CertifiedTrigger and optionally watch connector sync
Fivetran Connectors Sync
Trigger and optionally watch connector sync
Starts a Fivetran connector sync through the Fivetran API.
Can force-cancel and restart an in-progress sync, or re-attach to one already in progress with reattach.
Waits for completion by default (up to 60 minutes) and fails if the connector reports a failure.
Fails right away on a paused connector, since Fivetran accepts the sync request but starts nothing.
A completion Fivetran reports while the connector is still syncing waits up to 1 minute for the syncing state to end before it is accepted, so the task does not return before the sync has finished, and a busy connector whose next sync starts right away still returns within that minute.
With assets.enableAuto set and wait: true, emits one asset per table the connector writes, with the id database.schema.name so it joins the dbt model reading that table in the lineage graph, and the source table as its input: a Table asset for database sources (e.g. PostgreSQL, MySQL, SQL Server, Snowflake, BigQuery) or an External asset connectorId.schema.table otherwise. With wait: false no asset is emitted, since the sync has not finished when the task returns.
If building or emitting an asset fails, assets.assetFailureBehavior applies: FAIL fails the task, WARN (the default) ends it in WARNING, IGNORE only logs at debug level.
Whatever assets.enableAuto is set to, reads the connector's schema config once (one extra GET) to output a per-table breakdown file (tables, tableCount, enabledTableCount) and a freshness summary with the connector's alert codes; a failed schema read logs a warning and never fails the task.
type: io.kestra.plugin.fivetran.connectors.SyncExamples
id: fivetran_sync
namespace: company.team
tasks:
- id: sync
type: io.kestra.plugin.fivetran.connectors.Sync
apiKey: "{{ secret('FIVETRAN_API_KEY') }}"
apiSecret: "{{ secret('FIVETRAN_API_SECRET') }}"
connectorId: "connector_id"
Sync a connector and emit one lineage asset per table it writes.
id: fivetran_sync_with_assets
namespace: company.team
tasks:
- id: sync
type: io.kestra.plugin.fivetran.connectors.Sync
apiKey: "{{ secret('FIVETRAN_API_KEY') }}"
apiSecret: "{{ secret('FIVETRAN_API_SECRET') }}"
connectorId: "connector_id"
assets:
enableAuto: true
Sync a connector, then read its freshness and per-table breakdown.
id: fivetran_sync_with_breakdown
namespace: company.team
tasks:
- id: sync
type: io.kestra.plugin.fivetran.connectors.Sync
apiKey: "{{ secret('FIVETRAN_API_KEY') }}"
apiSecret: "{{ secret('FIVETRAN_API_SECRET') }}"
connectorId: "connector_id"
wait: true
- id: report
type: io.kestra.plugin.core.log.Log
message: |
Alerts: {{ outputs.sync.freshness.alertCount }},
enabled tables: {{ outputs.sync.enabledTableCount }} of {{ outputs.sync.tableCount }},
breakdown file: {{ outputs.sync.tables }}
Re-attach to a sync already running on the connector instead of triggering a duplicate.
id: fivetran_sync_reattach
namespace: company.team
tasks:
- id: sync
type: io.kestra.plugin.fivetran.connectors.Sync
apiKey: "{{ secret('FIVETRAN_API_KEY') }}"
apiSecret: "{{ secret('FIVETRAN_API_SECRET') }}"
connectorId: "connector_id"
reattach: true
reattachMaxAge: PT30M
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-fivetran --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
apiKey *string
Fivetran API key
Required; paired with apiSecret for HTTP Basic authentication.
apiSecret *string
Fivetran API secret
Required secret token used with apiKey for Basic authentication.
connectorId *string
Connector ID
Identifier of the Fivetran connector to sync.
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
{}1150baseUrl string
https://api.fivetran.comFivetran API base URL
Base endpoint for all requests. Defaults to https://api.fivetran.com; override for regional or private deployments.
force booleanstring
falseForce restart if already syncing
When true, cancels a running sync before starting a new one. Default is false to skip if a sync is already running.
initialRetryDelay string
PT1SInitial delay before the first retry
Backoff grows from this delay, capped at 30 seconds. Default: 1 second.
maxAttempts integerstring
3Maximum number of attempts on transient errors
Total attempts including the first call, not just retries. Default: 3.
maxDuration string
PT1HMaximum wait duration
Upper bound for waiting when wait is true. Default is 60 minutes.
options
HTTP client options
Optional Kestra HTTP configuration (timeouts, proxy) applied to Fivetran calls. Retries are configured separately via maxAttempts and initialRetryDelay.
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.
pollFrequency string
PT5SPoll frequency
Interval between connector status checks while waiting for the sync to complete. Default is 5 seconds.
reattach booleanstring
falseReattach to an already in-progress sync instead of starting a new one
When true, adopts any sync already running on the connector -- including one Fivetran started itself on its own schedule, not just a sync a previous run of this task triggered -- instead of triggering a new one. Fivetran exposes no way to tell one sync run apart from another, so adoption matches on the connector's own sync_state: syncing as reported by Fivetran, not on this execution's identity. This covers a worker-loss resubmit, a retry, a replay, a manual re-run, or two executions driving the same connector: whichever one observes the connector already syncing waits on it instead of triggering a duplicate. Default is false. force: true always takes precedence over reattach and starts a new sync regardless.
reattachMaxAge string
Maximum age of an in-progress sync that can still be re-attached to
Used only when reattach is true. Fivetran reports no sync start time, so the connector's last completion timestamp is used as a conservative upper bound on how long the current sync has been running: when that bound exceeds reattachMaxAge, the in-progress sync is treated as stale: it is cancelled and a new sync is started (the trigger is sent with force: true) instead of adopting it. A connector that has never completed a sync has no such upper bound to check, so once reattachMaxAge is set it is always treated as stale and never adopted -- also taking the forced, cancel-and-restart path. Default is unbounded: any in-progress sync is adopted, however long it has been running.
wait booleanstring
trueWait for sync completion
When true (default), poll the connector until the sync finishes to capture status and logs. Set to false to return once the sync has been triggered, without waiting for it. succeededAt is then null, since the sync is still running on Fivetran. No assets are emitted in that case, since the sync has not finished. To record lineage after the sync, add a downstream io.kestra.plugin.fivetran.connectors.Status task with assets.enableAuto.
Outputs
connectorId string
Connector ID
The connector this task synced.
enabledTableCount integer
Number of enabled tables
Tables that are enabled and belong to an enabled schema, i.e. the ones written to the destination. Null when the schema config could not be read.
freshness
Connector freshness
State of the connector when the task returned.
With wait: true it is read after the sync completed.
With wait: false it is the snapshot taken before the sync was triggered, so fresh is null and freshness.succeededAt is the connector's last known success, which predates the triggered sync.
The top-level succeededAt is the completion of the sync this task observed.
io.kestra.plugin.fivetran.connectors.ConnectorFreshness
Alert codes
De-duplicated codes of the connector's warnings and tasks. Alert messages are left out to keep the output bounded.
0Number of alerts
Size of the connector's status.warnings plus status.tasks.
date-timeTimestamp of the last failed sync
Whether the connector's data is fresh
True when wait is true, since a sync that just succeeded is fresh by definition.
Null when wait is false, because the sync is still running.
Whether the connector is paused
Current setup state
As reported by Fivetran, e.g. connected, broken, incomplete.
date-timeTimestamp of the last successful sync
The connector's last known success, taken from the connector snapshot. With wait: false it predates the sync this task triggered; use the top-level succeededAt for the sync the task itself observed.
Sync frequency in minutes
Current sync state
As reported by Fivetran, e.g. scheduled, syncing, paused, rescheduled.
Current update state
As reported by Fivetran, e.g. on_schedule, delayed.
reattached boolean
falseWhether an already in-progress sync was re-attached to
True when reattach adopted a sync already running on the connector instead of triggering a new one.
succeededAt string
date-timeTimestamp of the sync this task waited for
The completion of the sync this task observed, as reported by Fivetran. Null when wait is false, since the sync is still running on Fivetran when the task returns. See freshness.succeededAt for the connector's last known success.
tableCount integer
Number of tables
Every table the connector reports, enabled or not. Null when the schema config could not be read.
tables string
uriPer-table breakdown file
URI of an Ion file in internal storage with one row per table of the connector: schema, schemaInDestination, schemaEnabled, table, tableInDestination, enabled, syncMode and enabledPatchAllowed.
Null when the schema config could not be read.
Metrics
reattached counter
Whether the task re-attached to an already in-progress sync (1) instead of triggering a new one (0).