Reusable Connectors Private Preview
Deploy a single Connector SDK package once and reuse it across multiple connections. Instead of uploading new code for every connection, you create a package independently and point any number of connections to it. When you update the package, every connection using it picks up the new code on its next sync.
Use reusable connectors when you manage the same connector code across many connections.
How it works
- Create a package from your local connector code using
fivetran package create. The command uploads your code and returns a package ID. - Use the package ID with
fivetran deploy --package-id <package-id>to create a connection backed by that package. No code is packaged or uploaded at this step. - Create additional connections using the same package ID. Each connection has its own configuration, sync schedule, and history. All connections share the same underlying code.
- When you need to update the connector code, run
fivetran package update <package-id>. Every connection that references the package picks up the new code on its next sync. You do not need to redeploy each connection individually.
Commands
fivetran deploy --package-id <package-id>
Use --package-id <package-id> with fivetran deploy to create or rebind a connection to an existing package, without packaging or uploading local code.
Signature
fivetran deploy --package-id <package-id> [OPTIONS]
Parameters
| Flag | Required | Description |
|---|---|---|
--package-id <package-id> | Optional | ID of an existing Connector SDK package. Skips local packaging and upload. The package must already exist in your account. |
All other fivetran deploy flags apply as normal, including --api-key, --destination, --connection, and --configuration. For more information, see fivetran deploy.
You do not need a local connector.py when using --package-id <package-id>, because the command skips packaging and uploading code.
Deploys that don't use --package-id <package-id> are unaffected. fivetran deploy without --package-id <package-id> continues to create a new package for every deploy, exactly as before.
Behavior
| Scenario | Result |
|---|---|
| New connection | Creates the connection and binds it to the specified package. Provide --configuration as with a standard deploy. |
| Existing connection, same package | Makes no changes. Prints a message and exits. |
| Existing connection, different package | Rebinds the connection to the new package. If the previous package was shared with other connections, prints a message that it left that package group. Other connections sharing the previous package are unaffected. |
| Package not found | Exits with package-id not found before making any connection changes. |
Running fivetran deploy without --package-id on a connection whose package is shared with other connections fails before uploading, requiring an explicit package choice before the connection leaves the shared package group. Use --package-id <package-id> to choose one.
Example
# Create a new connection bound to an existing package
fivetran deploy --api-key <BASE_64_ENCODED_API_KEY> --destination my_destination --connection my_connection --configuration configuration.json --package-id my_package
# Create a second connection sharing the same package
fivetran deploy --api-key <BASE_64_ENCODED_API_KEY> --destination my_destination --connection my_other_connection --configuration configuration.json --package-id my_package
# Rebind an existing connection to a different package (--configuration not required)
fivetran deploy --api-key <BASE_64_ENCODED_API_KEY> --destination my_destination --connection my_connection --package-id my_other_package
fivetran package create
Packages your local connector code, uploads it, and creates a new package without creating or binding a connection.
Signature
fivetran package create [project_path] [OPTIONS]
Parameters
| Flag | Required | Description |
|---|---|---|
<project path> | Optional | Specifies a non-default project path, absolute or relative. When omitted, the command runs in the current directory. |
--api-key <BASE_64_ENCODED_API_KEY> | Yes | Base64-encoded Fivetran API key. |
--non-interactive | Optional | Automatically answers each y/n prompt with its default value. A capital letter indicates the default answer. For example, y/N defaults to No. |
--yes | Optional | Automatically answers Yes to each y/n prompt. |
Example
fivetran package create --api-key <BASE_64_ENCODED_API_KEY>
fivetran package create "/Users/fivetran/connector_sdk/my_connector" --api-key <BASE_64_ENCODED_API_KEY>
fivetran package create --api-key <BASE_64_ENCODED_API_KEY> --non-interactive
fivetran package create --api-key <BASE_64_ENCODED_API_KEY> --yes
Output
Prints the auto-generated package ID:
package id: my_package
Use this ID with fivetran deploy --package-id <package-id> to create or rebind connections, or with fivetran package update <package-id> to replace its code later.
Notes
fivetran package createuses the same local packaging rules asfivetran package. It validatesrequirements.txtorpyproject.tomlby default and respects.gitignore. For more information, seefivetran package.- Fivetran automatically deletes packages with no connections after 14 days. To keep a package active, bind at least one connection to it using
fivetran deploy --package-id <package-id>.
fivetran package update <package-id>
Replaces the code of an existing package. Every connection that references the package picks up the new code on its next sync.
Signature
fivetran package update <package-id> [project_path] [OPTIONS]
Parameters
| Flag | Required | Description |
|---|---|---|
<package-id> | Yes | ID of an existing package to update. Use fivetran package list to find package IDs in your account. |
<project path> | Optional | Specifies a non-default project path, absolute or relative. When omitted, the command runs in the current directory. |
--api-key <BASE_64_ENCODED_API_KEY> | Yes | Base64-encoded Fivetran API key. |
--non-interactive | Optional | Automatically answers each y/n prompt with its default value. A capital letter indicates the default answer. For example, y/N defaults to No. |
--yes | Optional | Automatically answers Yes to each y/n prompt. |
Example
fivetran package update my_package --api-key <BASE_64_ENCODED_API_KEY>
fivetran package update my_package "/Users/fivetran/connector_sdk/my_connector" --api-key <BASE_64_ENCODED_API_KEY>
fivetran package update my_package --api-key <BASE_64_ENCODED_API_KEY> --non-interactive
fivetran package update my_package --api-key <BASE_64_ENCODED_API_KEY> --yes
Notes
- Exits with
package-id not foundif the package does not exist in your account. - Only the package creator or an account admin can update a package. Other users receive a permission error.
- Updating a package does not change which connections reference it. It only replaces the code those connections run on their next sync.
fivetran package list
Lists packages in your account and how many connections are currently using each one.
Signature
fivetran package list [OPTIONS]
Parameters
| Flag | Required | Description |
|---|---|---|
--api-key <BASE_64_ENCODED_API_KEY> | Yes | Base64-encoded Fivetran API key. |
--limit <count> | Optional | Maximum number of packages to return. If omitted, all packages in the account are listed. |
Example
fivetran package list --api-key <BASE_64_ENCODED_API_KEY>
fivetran package list --api-key <BASE_64_ENCODED_API_KEY> --limit 10
Output
Prints every package's ID, including packages not currently associated with any connection, and how many connections are associated with each one.
Fivetran automatically deletes packages with no connections after 14 days.
Permissions
| Command | Who can run it |
|---|---|
fivetran package create | Any authenticated account user. |
fivetran package list | Any authenticated account user. |
fivetran package update <package-id> | The package creator or an account admin. |
fivetran deploy --package-id <package-id> | Any authenticated account user with permission to create or update connections. |
Delete a shared package
Because a shared package can serve multiple connections, Fivetran blocks deletion if any connection still references it. Rebind or delete all connections using the package before attempting to delete it. fivetran package list shows the count of connections associated with each package. To see which connections reference a package, call GET /v1/connector-sdk/packages/{id} and check the connection_ids field.
To delete the package, call DELETE /v1/connector-sdk/packages/{id}.
Only the package creator or an account admin can delete a package.
Manage with REST API
You can also manage reusable packages through the REST API. Pass an existing package ID as config.package_id to create or rebind a connection to a shared package. For more information, see the Create Connection and Modify Connection endpoints. Learn more in the Connector SDK API reference.
The Connector SDK package REST API's connection_id field is deprecated. For a package linked to zero or multiple connections, connection_id is null. Use the new connection_ids array field instead, which lists every connection currently using the package.