Redeploying Connectors
Use the same destination and connection name to update an existing connection:
fivetran deploy --api-key <YOUR_BASE64_API_KEY> --destination <YOUR_DESTINATION_NAME> --connection <YOUR_CONNECTION_NAME> --configuration <PATH_TO_CONFIGURATION_JSON>
During an interactive deployment, the CLI asks you to confirm that you want to overwrite the existing connector code. Use --yes for an intentional automated redeployment.
Redeployment has the following behavior:
- The new code is used when the next sync starts.
- If a sync is already running, redeployment cancels or fails that sync. Trigger the next sync after deployment to run the updated code.
- Code, dependency, or Python-version changes will affect the next sync, so test them before deployment.
- Do not pass configuration for a code-only update unless you intend to change stored configuration values.
- Redeploying code does not backfill columns added to previously delivered rows. Trigger a historical re-sync when a schema change requires existing data to be reloaded.
- If you change a table's primary key, drop the destination table and perform a historical re-sync to preserve data integrity.
For a safer release process, deploy the same code to a separate test connection and configuration first. After validation, deploy it to the production connection.
To roll back, redeploy a previously tested revision from version control. You can also download the deployed connector code from the connection's Settings tab. The download does not contain configuration or state.
Configuration behavior during redeployment
Treat configuration and code as separate deployment inputs:
- When you supply a non-empty configuration file during redeployment, Fivetran merges its keys and values into the connection's stored configuration. We add or update the keys you include and leave all other keys unchanged. To delete a key, set its value to
nullin the configuration file. - Supplying an empty configuration object keeps the existing stored values.
- Omitting configuration when redeploying an existing connection keeps the current configuration.
- After deployment, you can edit configuration values from the connection's setup form.
Updating credentials
To update a connection's credentials, call the Update a Connection endpoint with a config.secrets_list containing only the keys you want to change. This lets you update or remove individual credentials without resending every key, which is useful when some credentials, such as those submitted through a Connect Card, aren't available to you.
The keys you send affect the existing secrets as follows:
- A key with
value: nulldeletes that key. - A key with any other value sets or overwrites it.
- Keys you don't include remain unchanged.
- The same key can't appear more than once in a single request.
If you omit secrets_list or send an empty list [], no secrets are changed. If you set secrets_list to null, all existing secrets are deleted.
The following example updates api_key, removes old_token, and adds new_secret in one request, while leaving every other existing key untouched:
{
"config": {
"secrets_list": [
{ "key": "api_key", "value": "updated-value" },
{ "key": "old_token", "value": null },
{ "key": "new_secret", "value": "added-value" }
]
}
}