Transformation
Represents a transformation in your Fivetran account. Transformations run SQL or dbt models on your destination data after each sync. Two types of transformations are supported: dbt transformations, which run your own dbt project, and Quickstart transformations, which use a pre-built Fivetran package.
Resource attributes
The following attributes describe a transformation and its current execution state.
View attribute definitions
| Field name | Type | Description |
|---|---|---|
id | string, read-only | Unique identifier of the transformation. |
type | string | Type of transformation. Possible values:DBT_CORE – Runs a dbt project.QUICKSTART – Runs a Fivetran Quickstart package. |
status | string, read-only | Current execution status of the transformation. Possible values:NEW – Created but not yet started.SCHEDULING – Waiting to be scheduled.RUNNING – Currently executing.TERMINATING – In the process of being stopped.SUCCEEDED – Completed successfully.PARTIALLY_SUCCEEDED – Completed with some failures.FAILED – Completed with errors.CANCELED – Canceled before completion.BLOCKED – Blocked from running.RESCHEDULED – Failed and will be retried automatically. |
paused | boolean | Indicates whether the transformation is paused. |
schedule | object | Scheduling configuration for the transformation. |
output_model_names | array of strings, read-only | List of output model names produced by the transformation. |
created_at | string, read-only | Date and time the transformation was created, in ISO 8601 format. |
created_by_id | string, read-only | Unique identifier of the user or system key that created the transformation. |
last_started_at | string, read-only | Date and time the transformation last started, in ISO 8601 format. |
last_ended_at | string, read-only | Date and time the transformation last ended, in ISO 8601 format. |
When you create or update an Integrated schedule, or a Custom schedule with Smart Syncing enabled, the API returns a 400 Bad Request response if connection_ids contains a connection with a custom connection time zone. Remove the custom time zone from the connection schedule or remove the connection from connection_ids, then retry the request. See the Set or change the sync frequency section for more information.
Supported operations
Once you have access to the Fivetran API, you can perform the following operations on the Transformation resource.
| Category | Endpoint | Description |
|---|---|---|
| Create | POST /v1/transformations | Creates a new transformation. |
| Read | - GET /v1/transformations- GET /v1/transformations/{transformationId} | - Returns a paginated list of all transformations in the account. - Returns the details of a transformation. |
| Update | PATCH /v1/transformations/{transformationId} | Updates an existing transformation. |
| Delete | DELETE /v1/transformations/{transformationId} | Deletes a transformation. |
| Run | POST /v1/transformations/{transformationId}/run | Triggers an immediate run of the transformation. |
| Cancel | POST /v1/transformations/{transformationId}/cancel | Cancels a running transformation. |
| Upgrade package | POST /v1/transformations/{transformationId}/upgrade | Upgrades a Quickstart transformation to the latest package version. |
| Read package metadata | - GET /v1/transformations/package-metadata- GET /v1/transformations/package-metadata/{package_definition_id} | - Returns a list of available Quickstart transformation packages. - Returns the metadata for a specific Quickstart transformation package. |