What Happens When I Set Conflicting Schedule or Networking Fields on a Connection?
Question
My Create Connection or Update Connection request sets more than one sync schedule field (for example, both sync_frequency and schedule), or more than one networking field, and the values don't agree with each other. Which value wins? Does the request fail?
Environment
REST API
Answer
Two sets of connection fields are resolved together, rather than field by field:
- Sync schedule fields:
sync_frequency,daily_sync_time,schedule_type, and the detailedscheduleobject (schedule_type,interval,time_of_day,cron,days_of_week,time_zone). - Networking fields:
networking_method,proxy_agent_id,private_link_id, andconnection_typeinconfig.
Sync schedule fields
If your request sets the detailed schedule object, it is applied, and sync_frequency and daily_sync_time have no effect on the resulting cadence.
Even with schedule, Fivetran validates sync_frequency and daily_sync_time: daily_sync_time is only accepted when sync_frequency is 1440. For example, sync_frequency: 360 with daily_sync_time: "03:00" returns a 409 before schedule can take effect.
In the following Update Connection request, schedule wins over sync_frequency (cron scheduling requires an Enterprise or Business Critical plan and isn't available for Hybrid Deployment connections):
{
"sync_frequency": 360,
"schedule": {
"schedule_type": "CRON",
"cron": "0 2 * * *"
}
}
The connection syncs once a day at 02:00 instead of every 6 hours. Afterward, sync_frequency is returned as null in the connection's details, because a cron schedule has no single cadence to report.
If the request omits time_zone, the connection may or may not keep its current time zone, depending on its existing schedule type. To avoid unexpected time zone changes, set time_zone explicitly when setting a cron schedule. The exception is a connection that has transformations scheduled on it: it can't use a schedule time zone, so omit time_zone - a request that sets it is rejected with a 400.
The top-level schedule_type field (auto/manual) is stored separately from the nested schedule.schedule_type and isn't changed by it. Setting schedule.schedule_type: "MANUAL" turns off the automatic cadence, but the connection's auto/manual mode only changes if the same request also sets the top-level field: send schedule_type: "manual" alongside it to keep both in sync, and schedule_type: "auto" when you switch back to an automatic schedule.
Networking fields
The effective networking method is resolved first, and then checked for consistency with proxy_agent_id/private_link_id. The resolution rules differ between Create Connection and Update Connection.
Create Connection
- If you set
networking_method, it's used, even ifconnection_typeinconfigsays something else -networking_methodsimply wins. - If you omit
networking_method, Fivetran infers it fromconnection_typeinconfigwhen the connector's configuration provides one, and otherwise defaults toDirectly.
Once the effective method is resolved, proxy_agent_id and private_link_id must match it, or the request is rejected with a 400. For example, sending proxy_agent_id without an effective method of ProxyAgent results in a 400 - whether because networking_method was explicitly set to something else, or because it was omitted and connection_type in config didn't point to ProxyAgent.
Update Connection
- If you set
networking_method, it's used, the same as on create. - If you omit
networking_methodbut changeconnection_typeinconfig, the new config value is used as the effective method - except when the new value isProxyAgentand noproxy_agent_idis provided, in which case the existing method is preserved. - If you omit
networking_methodand don't changeconnection_typeinconfig, the connection's existing networking method is preserved. This means you can send justproxy_agent_idto swap the proxy agent on a connection that already usesProxyAgent, without re-specifyingnetworking_method.
Validation of proxy_agent_id/private_link_id follows the same principle as on create: the IDs must match the effective method. On update, Fivetran also considers IDs already saved on the connection. If you switch the networking method away from ProxyAgent or PrivateLink, explicitly remove the old ID (proxy_agent_id: null or private_link_id: null) in the same request, or the saved ID will conflict with the new method and the request will be rejected with a 400.