pyfivetran.endpoints.connector

Module Contents

Classes

Connector

ConnectorEndpoint

API

class pyfivetran.endpoints.connector.Connector[source]

Bases: pyfivetran.endpoints.base.ApiDataclass

fivetran_id: str = None
service: str = None
schema: str = None
paused: bool = None
sync_frequency: int = None
pause_after_trial: bool = None
group_id: str = None
connected_by: str = None
service_version: int = None
created_at: datetime.datetime | str = None
data_delay_senstivity: Literal[LOW, NORMAL, HIGH, CUSTOM] = 'NORMAL'
setup_tests: Optional[List[Dict[str, Any]]] = None
source_sync_details: Optional[Dict[str, Any]] = None
data_delay_threshold: Optional[int] = 0
connect_card: Optional[Dict[str, Any]] = None
status: Optional[Dict[str, Any]] = None
daily_sync_time: Optional[str] = None
succeeded_at: Optional[datetime.datetime | str] = None
failed_at: Optional[str | datetime.datetime] = None
schedule_type: Literal[auto, manual] = 'auto'
connect_card_config: Optional[Dict[str, Any]] = None
config: Optional[Dict[str, Any]] = None
_is_deleted: bool = False
property as_url: str
property raw: Dict[str, Any]
modify(config: Optional[Dict[str, Any]] = None, auth: Optional[Dict[str, Any]] = None, paused: Optional[bool] = None, trust_certificates: Optional[bool] = None, trust_fingerprints: Optional[bool] = None, daily_sync_time: Optional[str] = None, run_setup_tests: Optional[bool] = None, sync_frequency: Optional[int] = None) pyfivetran.shed.GeneralApiResponse[source]
modify_state(state: Dict[str, Any]) pyfivetran.shed.GeneralApiResponse[source]

Modifies the connector state. This endpoint is only supported for function connectors.

Parameters:

state – The state of the connector

Returns:

GeneralApiResponse

delete() pyfivetran.shed.GeneralApiResponse[source]

Deletes the connector. :return: GeneralApiResponse

resync(scope: Optional[Dict[str, List[str]]] = None) pyfivetran.shed.GeneralApiResponse[source]

Resyncs the connector.

Parameters:

scope – A map containing an array of tables to re-sync for each schema, must be non-empty.

Returns:

GeneralApiResponse

run_setup_tests(trust_certificates: Optional[bool] = None, trust_fingerprints: Optional[bool] = None) pyfivetran.shed.GeneralApiResponse[source]

Runs setup tests on the connector.

Parameters:
  • trust_certificates – Whether to trust certificates

  • trust_fingerprints – Whether to trust fingerprints

Returns:

GeneralApiResponse

sync(force: Optional[bool] = None) pyfivetran.shed.GeneralApiResponse[source]

Triggers a data sync for an existing connector within your Fivetran account without waiting for the next scheduled sync. This action does not override the standard sync frequency you defined in the Fivetran dashboard.

Parameters:

force – If force is true and the connector is currently syncing, it will stop the sync and re-run it.

Returns:

GeneralApiResponse

classmethod _from_dict(endpoint, d: Dict[str, Any]) pyfivetran.endpoints.connector.Connector[source]

Helper method for deserializing from a dict :param d: The dict to deserialize :return: The deserialized object

class pyfivetran.endpoints.connector.ConnectorEndpoint(client: pyfivetran.endpoints.base.Client)[source]

Bases: pyfivetran.endpoints.base.Endpoint

BASE_URL: str = None
connect_card(connector_id: str, redirect_uri: str, hide_setup_guide: Optional[bool] = None) pyfivetran.shed.GeneralApiResponse[source]

Generates the Connect Card URI for the connector.

Parameters:
  • connector_id – Unique ID of the connector in Fivetran

  • redirect_uri – Redirect URI for the connector

  • hide_setup_guide – Whether to hide the setup guide

Returns:

GeneralApiResponse

get_config_metadata(service: str) pyfivetran.shed.GeneralApiResponse[source]

Returns metadata of configuration parameters and authorization parameters for a specified connector type.

Parameters:

service – The service to get the config metadata for

Returns:

GeneralApiResponse

get_connector(connector_id: str) pyfivetran.endpoints.connector.Connector[source]

Gets a connector.

Parameters:

connector_id – Unique ID of the connector in Fivetran

Returns:

Connector

get_connector_state(connector_id: str) pyfivetran.shed.GeneralApiResponse[source]

Return connector state. Only supported for function connectors.

Parameters:

connector_id – Unique ID of the connector in Fivetran

Returns:

GeneralApiResponse

get_source_metadata(limit: Optional[int] = None) List[pyfivetran.shed.PaginatedApiResponse][source]

Returns all available source types within your Fivetran account. This endpoint makes it easier to display Fivetran connectors within your application because it provides metadata including the proper source name (‘Facebook Ad Account’ instead of facebook_ad_account), the source icon, and links to Fivetran resources. As we update source names and icons, that metadata will automatically update within this endpoint

Parameters:

limit – The number of records to return

Returns:

List[PaginatedApiResponse]

create_connector(connector: pyfivetran.endpoints.connector.Connector | dict[str, Any]) pyfivetran.endpoints.connector.Connector[source]

Creates a new connector.

Parameters:

connector – Connector

Returns:

Connector