Update a Connector Schema Config
Updates the schema config for an existing connector within your Fivetran account.
NOTE: For backward compatibility, the response may contain the 'enable_new_by_default' boolean field. It indicates if the sync for new schemas and tables is enabled by default. The value is 'true' if you specify 'ALLOW_ALL' as the value of 'schema_change_handling'. In the future API versions, we may remove this field.
The response contains only the difference between your selections and the schema config. The schema config includes schemas, tables, and columns. If you have not specified any schema configurations that differ from the default, the response will consist of only the top schema level. For more information, see also the Connector Schema config tutorial.
Request schema
Path parameters
The unique identifier for the connector within the Fivetran system
Header parameters
HTTP: basicAuth
HTTP AuthorizationScheme: basic
Request
The set of schemas within your connector schema config that are synced into the destination
The boolean value specifying whether the sync for the table into the destination is enabled.
The set of tables within your database schema config that are synced into the destination
The boolean value specifying whether the sync for the table into the destination is enabled.
The set of columns within your table schema config that are synced into the destination
The boolean value specifying whether the sync for the table into the destination is enabled.
The boolean value specifying whether a column should be hashed
This field appears in the response if the connector supports switching sync modes for tables
The possible values for the schema_change_handling parameter are as follows:
ALLOW_ALL - all new schemas, tables, and columns which appear in the source after the initial setup are included in syncs
ALLOW_COLUMNS - all new schemas and tables which appear in the source after the initial setup are excluded from syncs, but new columns are included
BLOCK_ALL - all new schemas, tables, and columns which appear in the source after the initial setup are excluded from syncs
PATCH /v1/connectors/connector_id/schemas HTTP/1.1
Accept: application/json
Authorization: Basic REPLACE_BASIC_AUTH
Content-Type: application/json
Host: api.fivetran.com
Content-Length: 448
{
"schemas": {
"schema": {
"enabled": true,
"tables": {
"table": {
"enabled": true,
"columns": {
"column": {
"enabled": true,
"hashed": false,
"is_primary_key": true,
"masking_algorithm": "PLAINTEXT"
}
},
"sync_mode": "SOFT_DELETE"
}
}
}
},
"schema_change_handling": "BLOCK_ALL"
}
Responses
Successful response schema
Response status code
Response status text
The boolean value specifying whether to enable new schemas, tables, and columns by default
The set of schemas within your connector schema config that are synced into the destination
The schema name within your destination in accordance with Fivetran conventional rules
The boolean value specifying whether the sync for the table into the destination is enabled.
The set of tables within your database schema config that are synced into the destination
This field appears in the response if the connector supports switching sync modes for tables
The schema name within your destination in accordance with Fivetran conventional rules
The boolean value specifying whether the sync for the table into the destination is enabled.
The set of columns within your table schema config that are synced into the destination
The schema name within your destination in accordance with Fivetran conventional rules
The boolean value specifying whether the sync for the table into the destination is enabled.
The boolean value specifying whether a column should be hashed
The boolean value specifying whether the enabled property can be updated
The additional message indicating the reason why the enabled property cannot be updated. This field appears in the response only when the reason_code value is OTHER
The reason code indicating the reason why the enabled property cannot be updated:
SYSTEM_TABLE - the table is a system table
DELETED - the table was deleted in the source
OTHER - the table was excluded by the system for some reason
This field appears in the response when the allowed property value is FALSE
The boolean value specifying whether the enabled property can be updated
The additional message indicating the reason why the enabled property cannot be updated. This field appears in the response only when the reason_code value is OTHER
The reason code indicating the reason why the enabled property cannot be updated:
SYSTEM_TABLE - the table is a system table
DELETED - the table was deleted in the source
OTHER - the table was excluded by the system for some reason
This field appears in the response when the allowed property value is FALSE
The possible values for the schema_change_handling parameter are as follows:
ALLOW_ALL - all new schemas, tables, and columns which appear in the source after the initial setup are included in syncs
ALLOW_COLUMNS - all new schemas and tables which appear in the source after the initial setup are excluded from syncs, but new columns are included
BLOCK_ALL - all new schemas, tables, and columns which appear in the source after the initial setup are excluded from syncs
{
"code": "Success",
"message": "Operation performed.",
"data": {
"enable_new_by_default": true,
"schemas": {
"schema": {
"name_in_destination": "schema_name_in_destination",
"enabled": true,
"tables": {
"table": {
"sync_mode": "SOFT_DELETE",
"name_in_destination": "table_name_in_destination",
"enabled": true,
"columns": {
"column": {
"name_in_destination": "column_name_in_destination",
"enabled": true,
"hashed": false,
"enabled_patch_settings": {
"allowed": false,
"reason": "...",
"reason_code": "SYSTEM_COLUMN"
},
"is_primary_key": true
}
},
"enabled_patch_settings": {
"allowed": false,
"reason": "...",
"reason_code": "SYSTEM_TABLE"
},
"supports_columns_config": true
}
}
}
},
"schema_change_handling": "ALLOW_ALL"
}
}