fivetran-connector-sdk Commands
The following CLI commands are available in the fivetran-connector-sdk PyPI package.
CLI (Command-Line Interface) is a text-based interface that lets you run commands directly in a terminal or console to perform tasks. In the context of Connector SDK, you use the CLI to configure, test, or deploy your custom connectors.
fivetran deploy
Deploys your code to Fivetran, creating or updating a connection. If the connection does not exist, it creates one. If the connection with the same name already exists, it prompts you to confirm whether to overwrite it.
Signature
fivetran deploy [OPTIONS]
Parameters
| Flag | Required | Description |
|---|---|---|
--api-key <BASE_64_ENCODED_API_KEY> | Yes | Fivetran API key for deployment. |
--destination <DESTINATION_NAME> | Yes | Destination name in your account. |
--connection <CONNECTION_NAME> | Yes | Connection name in your destination. |
--configuration | Optional | JSON file defining configuration values. |
--force | Optional | Automatically answers prompts (Yes/No). |
--python <Python version number> , --python-version <Python version number> | Optional | Python runtime version. |
--hybrid-deployment-agent-id <ID> | Optional | Specify non-default hybrid agent. |
"<project path>" | Optional | Specifies non-default project path, absolute or relative. When omitted, command runs in current directory. |
Example
fivetran deploy --api-key--destination Snowflake --connection my_connection
Notes
- When using
fivetran deploy, we support only.pyfiles and arequirements.txtfile as part of the code upload. No other code files are supported or uploaded during the deployment process. Ensure that your code is structured accordingly and all dependencies are listed inrequirements.txt. - Missing required parameters trigger prompts to provide them. Omitting configuration also trigger a confirmation prompt.
- Defaults can be set via environment variables.
fivetran debug
Runs and debugs connector code locally. It tests and troubleshoots the connection's behavior with the source's actual data and generates a local warehouse.db file, a DuckDB representation of the data delivered by the connection to the destination. This process internally emulates Fivetran's core.
Signature
fivetran debug [OPTIONS]
Parameters
| Flag | Required | Description |
|---|---|---|
--configuration | Optional | Specifies configuration for local run. |
"<project path>" | Optional | Specify non-default project path, absolute or relative. When omitted, command runs in current directory |
Example
fivetran debug "/Users/fivetran/connector_sdk/sample_connector"
fivetran reset
Deletes the current local state.json and warehouse.db file. It allows to re-run fivetran debug from scratch. This simulates the initial sync as the connector behaves as if it is running for the first time.
Signature
fivetran reset [OPTIONS]
Parameters
| Flag | Required | Description |
|---|---|---|
"<project path>" | Optional | Specify non-default project path, absolute or relative. When omitted, command runs in current directory |
Example
fivetran reset
fivetran version
Displays installed SDK version. Version is required for getting support from Fivetran and troubleshooting issues.
fivetran version # This format works. fivetran --version # This format works as well.
fivetran --help
Lists all available commands and parameters.
fivetran --help
fivetran init
Initializes a new Connector SDK connection by setting up the project structure, configuration files, and boilerplate code to help you get started quickly. Includes an option to configure context for the AI assistant of your choice.
Signature
fivetran init [OPTIONS]
Parameters
| Flag | Required | Description |
|---|---|---|
"<project path>" | Optional | Specifies the project path, absolute or relative. If not provided, the command runs in the current directory. |
--template <repository path> | Optional | Specifies connector example repository path, relative to fivetran_connector_sdk repository. If not provided, default connector template is used. |
Example
# Initialize a Connector SDK project in the current directory fivetran init # Initialize a Connector SDK project in a specific directory; if directory does not exist, it will be created fivetran init ./my-new-connector-project # Initialize a Connector SDK project using a specific example fivetran init --template examples/quickstart_examples/hello # Initialize a Connector SDK project in a specific directory using a specific example fivetran init ./my-new-connector-project --template examples/quickstart_examples/hello