Fivetran
Disclaimer
Your use of this download is governed by Stonebranch’s Terms of Use, which are available at https://www.stonebranch.com/integration-hub/Terms-and-Privacy/Terms-of-Use
Version Information
Template Name | tension Name | Extension Version |
---|---|---|
Fivetran | ue-fivetran |
Overview
Fivetran is a cloud-based data integration platform that helps businesses automate the process of extracting data from various sources, transforming it, and loading it into a data warehouse for analysis. It offers a wide range of pre-built connectors to popular data sources such as databases, marketing platforms, CRMs, and more. Fivetran's connectors are designed to be easy to set up and use, allowing businesses to focus on data analysis rather than data integration. The platform also offers features such as data transformation, scheduling, monitoring, and access control to help organizations manage their data pipelines more efficiently. Fivetran supports a variety of data warehouses, including Amazon Redshift, Google BigQuery, Snowflake, and Microsoft Azure.
This integration allows to create and execute Fivetran Tasks in Universal Controller.
Key Features
Feature | Description |
---|---|
Action Sync | Trigger a Sync action for a Connector on Fivetran. Optionally, wait until the Sync is completed. |
Action Re-sync (Historical Sync) | Trigger a Historical Sync action for a Connector on Fivetran. Optionally, wait until the Re-sync is completed. |
Requirements
This integration requires a Universal Agent and a Python runtime to execute the Universal Task.
Area | Details |
---|---|
Python Version | Requires Python of version 3.7. Tested with the Universal Agent bundled Python distribution (python version 3.7.16) |
Universal Agent | Both Windows and Linux agents are supported:
|
Universal Controller | Universal Controller Version 7.1.0.0 and later. |
Network and Connectivity | Outbound internet connectivity towards Fivetran endpoints. |
Fivetran REST API Version Compatibility | This Integration uses the following APIs and it is compatible with Fivetran as long as Fivetran retains backward compatibility on the REST API level with respect to the following endpoints and versions.
|
Supported Actions
Action: “Sync”
Triggers a data sync for an existing connector within your Fivetran account without waiting for the next scheduled sync. If the connector is paused, the data sync will be scheduled to be performed when the connector is re-enabled.
Task definition author has the capability to configure the task to wait for success or failure, through Wait for Sync to Finish field.
Configuration examples
User Scenario: Trigger Connector Sync | User Scenario: Trigger Connector Sync and Wait Until Success or Failure |
Action Output
Output Type | Successful Execution | Example |
---|---|---|
EXTENSION | The extension output follows the standard Extension Output format, providing:
| { "exit_code": 0, "status_description": "Task executed successfully.", "invocation": { "extension": "ue-fivetran", "version": "1.0.0", "fields": { ... }, }, "result": { "latest_connector_details": { "destination_schema": { "name": "github" }, "id": "paving_diffuser", "group_id": "fistula_cheek", "connector_type_id": "github", "name": "github", "connected_by": "balsam_dilapidated", "created_at": "2023-05-23T12:51:13.378309Z", "succeeded_at": "2023-05-24T15:33:12.153Z", "failed_at": "2023-05-23T13:09:32.747Z", "paused": false, "pause_after_trial": false, "version": 0, "sync_frequency": 360, "schedule_type": "auto", "status": { "setup_state": "connected", "schema_status": "ready", "sync_state": "scheduled", "update_state": "on_schedule", "is_historical_sync": false, "tasks": [], "warnings": [] }, "config": { "sync_mode": "SPECIFIC_REPOSITORIES", "repositories": [ "ue-fivetran/test-repo-ue-fivetran" ], "auth_mode": "PERSONAL_ACCESS_TOKEN", "username": "fivetran.user@dev.com", "pat": "******", "use_webhooks": true } } } } |
Failed Execution | Example | |
| { "exit_code": 31, "status_description": "Task execution failed.", "invocation": { "extension": "ue-fivetran", "version": "1.0.0", "fields": { ... }, }, "result": { "errors": [ "Invalid authorization credentials" ], "execution_info": { "url": "https://api.fivetran.com/v1/groups", "http_code": 401 } } } |
Αction: “Re-sync”
Triggers a full historical data sync for a specific connector. If the connector is paused, the data sync will be scheduled to be performed when the connector is re-enabled. Task definition author has the capability to configure the task to wait for success or failure, through Wait for Sync to Finish field.
Configuration examples
User Scenario: Trigger Connector Re-sync |
Action Output
Output Type | Successful Execution | Example (Successful Execution) |
---|---|---|
EXTENSION | The extension output follows the standard Extension Output format, providing:
| { "exit_code": 0, "status_description": "Task executed successfully.", "invocation": { "extension": "ue-fivetran", "version": "1.0.0", "fields": { ... }, }, "result": { "latest_connector_details": { "code": "Success", "data": { "destination_schema": { "name": "github" }, "id": "paving_diffuser", "group_id": "fistula_cheek", "connector_type_id": "github", "name": "github", "connected_by": "balsam_dilapidated", "created_at": "2023-05-23T12:51:13.378309Z", "succeeded_at": "2023-05-25T14:09:37.460Z", "failed_at": "2023-05-24T15:34:22.341Z", "paused": false, "pause_after_trial": false, "version": 0, "sync_frequency": 360, "schedule_type": "auto", "status": { "setup_state": "connected", "schema_status": "ready", "sync_state": "scheduled", "update_state": "on_schedule", "is_historical_sync": false, "tasks": [], "warnings": [] }, "config": { "sync_mode": "SPECIFIC_REPOSITORIES", "repositories": [ "ue-fivetran/test-repo-ue-fivetran" ], "auth_mode": "PERSONAL_ACCESS_TOKEN", "username": "fivetran.user@dev.com", "pat": "******", "use_webhooks": true } } } } } |
Failed Execution | Example | |
| { "exit_code": 1, "status_description": "Task execution failed.", "invocation": { "extension": "ue-fivetran", "version": "1.0.0", "fields": { ... }, }, "result": { "errors": [ "Invalid authorization credentials" ], "execution_info": { "url": "https://api.fivetran.com/v1/groups", "http_code": 401 } } } |
Input Fields
Field | Type | Default Value | Mandatory | Description | Introduced in Version |
---|---|---|---|---|---|
Action | Choice | Sync | Yes | The action performed upon the task execution. Available options:
| 1.0.0 |
Credentials | Credentials | Yes | The API Key & Secret are used for Authentication. Credential definitions should be as follows:
| 1.0.0 | |
Destination Name | Dynamic Choice Field | Yes | The Destination / Group the Connector Belongs to. | 1.0.0 | |
Connector Name | Dynamic Choice Field | Yes | The Connector Name | 1.0.0 | |
Wait for Sync to Finish | Checkbox | False | No | Wait for the Connector Sync to be finished, either with Success or Failure Fivetran does not provide specific APIs to retrieve the status of a specific Sync Instance, therefore identification of a Successful or Failed completion of a sync operation is implemented by means of a “Best Effort” algorithm. | 1.0.0 |
Polling Interval (sec) | Integer | 5 | No | The polling interval in seconds on which the task is polling for the Fivetran Connector Sync status. The minimum acceptable value is “1“. Default value is “5“. Available only in case Wait for Sync to Finish = True | 1.0.0 |
Force Sync | Boolean | False | No | If Force Sync is True and the connector is currently syncing, sync is stopped and restarted. If Force Sync is False, the connector will sync only if it isn't currently syncing. Available only when Action = “Sync” | 1.0.0 |
Output-Only fields
Field | Type | Description | Introduced in Version |
---|---|---|---|
Setup State | Text | The set-up state of the Connector. Retrieved/Updated before the Sync trigger and during polling. | 1.0.0 |
Sync State | Text | The sync status of the Connector. Retrieved/Updated before the Sync trigger and during polling. | 1.0.0 |
Extension Cancelation and Re-run
Cancellation from UC will just stop the execution of the Task. The Re-run of the task behaves the same way as on the initial run.
In case Action = “Sync” and in case Force Sync = “True” and the connector is currently syncing, sync is stopped and restarted. In the case where Force Sync = “False”, the connector will sync only if it isn't currently syncing.
In case Action = “Re-sync (Historical Sync)” and the connector is currently syncing, sync is always stopped and restarted (based on the logic of Fivetran API)
In all cases, if Wait for Sync to Finish = “True” the Task will wait until the Sync Status reaches Success or Failure.
Exit Codes
Extension Exit Code | Status | Status Description | Meaning |
---|---|---|---|
0 | SUCCESS | “Task executed successfully“ | Successful Execution |
1 | FAIL | “Execution Failed: Task completed with errors. Refer to STDERR or Extension Output for more details.” | Generic error failure, when the error code does not match exit codes 3, 10, 20, 30, 31. |
3 | AUTHORIZATION_ERROR | “Authorization Error: Invalid or insufficient credentials.” | The given Fivetran API Key or Secret is unauthorized. |
10 | CONNECTION_ERROR | “Connection Error: Fivetran server responded with error.“ | Fivetran server connection error. |
20 | DATA_VALIDATION_ERROR | “Data Validation Error: <error details>.“ | Input fields Validation Error. |
30 | SYNC_FAILED | “Sync Failed: Sync or Re-sync was triggered, but completed with failure.“ | Sync completed and identified as failed. |
31 | SYNC_MONITOR_FAIL | “Sync Monitor Failed: Sync or Re-sync was triggered, but an error occurred while monitoring for its completion.” | An error occurred during the monitoring phase. Monitoring is enabled by Wait for Sync to Finish, input field. |
STDOUT and STDERR
STDOUT and STDERR provide additional information to User. The populated content can be changed in future versions of this extension without notice. Backward compatibility is not guaranteed.
STDOUT in this integration is empty.
How To
Import Universal Template
To use the Universal Template, you first must perform the following steps.
This Universal Task requires the Resolvable Credentials feature. Check that the Resolvable Credentials Permitted system property has been set to true.
To import the Universal Template into your Controller, follow these instructions.
When the files have been imported successfully, refresh the Universal Templates list; the Universal Template will appear on the list.
Modifications of this integration, applied by users or customers, before or after import, might affect the supportability of this integration. For more information refer to Integration Modifications.
Configure Universal Task
For a new Universal Task, create a new task, and enter the required input fields.
Integration Modifications
Modifications applied by users or customers, before or after import, might affect the supportability of this integration. The following modifications are discouraged from retaining the support level as applied for this integration.
Python code modifications should not be done.
Template Modifications
General Section
"Name", "Extension", "Variable Prefix", and "Icon" should not be changed.
Universal Template Details Section
"Template Type", "Agent Type", "Send Extension Variables", and "Always Cancel on Force Finish" should not be changed.
Result Processing Defaults Section
Success and Failure Exit codes should not be changed.
Success and Failure Output processing should not be changed.
Fields Restriction Section
The setup of the template does not impose any restrictions, However with respect to the "Exit Code Processing Fields" section.Success/Failure exit codes need to be respected.
In principle, as STDERR and STDOUT outputs can change in follow-up releases of this integration, they should not be considered as a reliable source for determining the success or failure of a task.
Users and customers are encouraged to report defects, or feature requests at Stonebranch Support Desk.
Document References
This document references the following documents:
Document Link | Description |
---|---|
User documentation for creating, working with, and understanding Universal Templates and Integrations. | |
User documentation for creating Universal Tasks in the Universal Controller user interface. | |
Fivetran official website. | |
User documentation for Fivetran REST API. |
Known Issues
Fivetran does not provide specific APIs to retrieve the status of a specific Sync Instance, therefore identification of a Successful or Failed completion, is implemented by means of a “Best Effort” algorithm. This algorithm relies on the fact that immediately after the Sync is triggered successfully, succeeded_at & failed_at timestamps are retrieved and saved. During polling, succeeded_at or failed_at timestamps are getting compared with the saved values. Polling will continue until the succeeded_at or the failed_at are updated which indicates either a successful or a failed sync. This logic is expected to work correctly in the vast majority of cases if not all. However, there could be some corner cases where it might not work as expected.
Changelog
ue-fivetran-1.0.1 (2023-10-18)
Fixes
Fixed
: Execute the integration with a Python installation, other than the Agent-bundled one (#34545).
ue-fivetran-1.0.0 (2023-06-08)
Initial Version