# Fivetran Tasks


This module contains a task for starting and monitoring Fivetran connector sync jobs

# FivetranSyncTask

class

prefect.tasks.fivetran.fivetran.FivetranSyncTask

(connector_id=None, **kwargs)[source]

Task for running Fivetran connector sync jobs.

This task assumes the user is a Fivetran user (https://fivetran.com) who has successfully setup a connector and has access to the API credentials for that user (https://fivetran.com/account/settings, "API Config").

Args:

  • connector_id (str, optional): Default connector id to use for sync jobs, if none is specified to run.
  • **kwargs (Any, optional): additional kwargs to pass to the base Task constructor

methods:                                                                                                                                                       

prefect.tasks.fivetran.fivetran.FivetranSyncTask.run

(api_key, api_secret, connector_id=None, poll_status_every_n_seconds=15)[source]

Task run method for Fivetran connector syncs.

An invocation of run will attempt to start a sync job for the specified connector_id. run will poll Fivetran for connector status, and will only complete when the sync has completed or when it receives an error status code from an API call.

Args:

  • api_key (str): API key per https://fivetran.com/account/settings; should be secret!
  • api_secret (str): API secret per https://fivetran.com/account/settings; should be secret!
  • connector_id (str, optional): if provided, will overwrite value provided at init.
  • poll_status_every_n_seconds (int, optional): this task polls the Fivetran API for status, if provided this value will override the default polling time of 15 seconds.
Returns:
  • dict: connector_id (str) and succeeded_at (timestamp str)



This documentation was auto-generated from commit 4980691
on April 29, 2021 at 20:09 UTC