Connection Schema
Represents the schema configuration of a connection in your Fivetran account.
Schema endpoints return 404 immediately after connection creation. Schemas are not populated until after the connection completes its first successful setup test or initial sync. To trigger setup tests before the first sync, use the Run setup tests endpoint.
Resource attributes
The following attributes define the sync behavior and object selection of the connection schema config resource.
Connection-level attributes
These attributes apply to the entire connection schema config and govern how the schema evolves over time.
| Field name | Type | Description |
|---|---|---|
schema_change_handling | string | Controls how new schemas, tables, and columns that appear in the source after the initial sync are handled. Possible values:ALLOW_ALL – All new schemas, tables, and columns are automatically included in syncs.ALLOW_COLUMNS – New columns are automatically included, but new schemas and tables are excluded.BLOCK_ALL – All new schemas, tables, and columns are excluded from syncs. |
enable_new_by_default | boolean, read-only | Indicates whether new schemas, tables, and columns are enabled by default. Derived from schema_change_handling. |
is_type_locked | boolean | Indicates whether the connection's destination data types are locked to the types determined from the source. |
Schema-level attributes
These attributes apply to individual schemas within the connection and control whether each schema is included in the sync.
| Field name | Type | Description |
|---|---|---|
enabled | boolean | Indicates whether sync is enabled for this schema. |
name_in_destination | string, read-only | Schema name in the destination, following Fivetran naming conventions. |
Table-level attributes
These attributes apply to individual tables within a schema and control whether each table is included in the sync and how its data is replicated.
| Field name | Type | Description |
|---|---|---|
enabled | boolean | Indicates whether sync is enabled for this table. |
name_in_destination | string, read-only | Table name in the destination. |
sync_mode | string | Sync mode for the table. Only present if the connection supports switching sync modes. Possible values:SOFT_DELETE – Deleted rows are retained in the destination and marked with a deleted flag.HISTORY – All versions of each row are stored in the destination.LIVE – Only the current state of each row is stored in the destination. |
parent_table | string, read-only | The name of the parent table that this table is grouped under. Only present for tables that belong to a group (for example, a core table's child tables). |
Column-level attributes
These attributes apply to individual columns within a table and control whether each column is included in the sync and how its data is handled.
| Field name | Type | Description |
|---|---|---|
enabled | boolean | Indicates whether sync is enabled for this column. |
name_in_destination | string, read-only | Column name in the destination. |
hashed | boolean | Indicates whether the column value is hashed before loading to the destination. |
is_primary_key | boolean | Indicates whether the column is a primary key. |
Supported operations
| Category | Endpoint | Description |
|---|---|---|
| Retrieval | GET /v1/connections/{connectionId}/schemas | Returns the full schema configuration, including all schemas, tables, and user-overridden columns. |
| Schema setup | POST /v1/connections/{connectionId}/schemas | Configures the schema for a new connection before the initial sync. |
| Configuration updates | PATCH /v1/connections/{connectionId}/schemasPATCH /v1/connections/{connectionId}/schemas/{schemaName}/tables/{tableName}PATCH /v1/connections/{connectionId}/schemas/{schemaName}/tables/{tableName}/columns/{columnName} | Updates the connection schema config or the configuration of a specific schema, table, or column. |
| Sync operations | POST /v1/connections/{connectionId}/schemas/reloadPOST /v1/connections/{connectionId}/schemas/tables/resync | Reloads the full schema from the source or triggers a historical sync for one or more tables. |
| Column management | DELETE /v1/connections/{connectionId}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}POST /v1/connections/{connectionId}/schemas/drop-columns | Marks one or more blocked columns for deletion from the destination. |