Required Declarations
This section outlines the required declarations for Fivetran Connector SDK connectors, including necessary imports and the essential Connector object.
Required imports
# Import required classes from fivetran_connector_sdk from fivetran_connector_sdk import Connector # For supporting Data operations like upsert(), update(), delete() and checkpoint() from fivetran_connector_sdk import Operations as op # For enabling Logs in your connector code from fivetran_connector_sdk import Logging as log
Description
Connector- needed to createConnectorobject by passing supported methodsupdate()andschema().Operations— supports data operations likeupsert(),update(),delete(), andcheckpoint().Logging— enables connector logs.<other imports required by your connector>- any additional libraries or modules your connector needs. Remember to include them in yourrequirements.txtfile if necessary.
Required object: Connector
Your connector must declare a Connector object.
connector = Connector(update=update, schema=schema)
If you only implement update():
connector = Connector(update=update)