---
title: "Update transform"
method: PATCH
path: "/transforms/{id}"
tags: ["Transforms"]
---

# Update transform

`PATCH /transforms/{id}`

Update an existing transform. All fields are optional. If the transform is published and publish=true, changes to sql_template or materialization will trigger a re-publish to the DWH. Use cron_expression to set the transform's own materialization schedule (published table transforms only), or null to clear it.

## Path parameters

- `id` string, required

## Request body

- TransformUpdateRequestDto
  - `name` string — The new name for the transform.
  - `folder_path` string — The new folder path. Intermediate folders will be auto-created if they do not exist.
  - `sql_template` string — The updated SQL template with {{weldTag}} parameter references.
  - `materialization` 'view' | 'table' — The materialization type.
  - `documentation` string — Documentation for the transform.
  - `cron_expression` string, nullable — Cron expression (UTC) defining the transform's own materialization schedule. Requires a published transform with materialization "table" that is not attached to an Orchestration Workflow. Pass null to clear the schedule, which stops the transform from being rebuilt automatically.
  - `publish` boolean — If true and the transform is currently published, changes to sql_template or materialization will trigger an automatic re-publish to the DWH. If false (default), the changes are saved but the DWH is not updated until an explicit publish call.
  - `wait_for_completion` boolean — If true, the API will wait for table materialization to complete before returning, up to a configured timeout (default ~45 seconds; may differ per environment). Only relevant when publishing with materialization set to "table". If the materialization does not complete within the timeout, the response will still succeed with materialization_status "running".

## Response `200`

- TransformDto
  - `id` string, required — The ID of the transform.
  - `name` string, required — The name of the transform.
  - `folder_path` string, required — The folder path for the transform.
  - `status` 'draft' | 'published', required — The status of the transform.
  - `materialization` 'view' | 'table', required — The materialization type.
  - `sql_template` string, required — The SQL template with {{weldTag}} parameter references. For a published transform this is the currently published SQL — an unpublished draft edit does NOT change it. Check has_unpublished_changes and read draft_sql_template to see such an edit.
  - `has_unpublished_changes` boolean, required — True when the transform is published and a newer, still-unpublished SQL version exists — for example after updating it without publish=true. Always false for a transform that has never been published, where status "draft" already says so and sql_template is the draft itself.
  - `draft_sql_template` string — The SQL template of the newest unpublished version, present only when has_unpublished_changes is true. Publish it with the publish endpoint (or publish_transform) to make it live.
  - `parameters` TransformParameterDto[], required — The parameters (dependencies) referenced in the SQL template.
    - `weld_tag` string, required — The weld tag reference used in the SQL template.
    - `type` 'raw_view' | 'model_view' | 'materialized_table', required — The type of dependency.
    - `dw_item_id` string, required — The fully-qualified data warehouse item identifier.
  - `documentation` string — Documentation for the transform.
  - `materialization_status` 'running' | 'completed' | 'failed', nullable — The status of the table materialization in the data warehouse. Set to "running", "completed", or "failed" for published table transforms, or null for drafts and view-type transforms.
  - `materialization_error` string — Error message from the data warehouse if table materialization failed.
  - `orchestration_workflow_id` string — The ID of the Orchestration Workflow that this transform is attached to, if any. Only reported while the attachment is actually in effect, so it can be relied on as the answer to "does this transform build as part of a workflow?".
  - `rebuild_trigger` 'none' | 'not_applicable' | 'not_scheduled' | 'orchestration' | 'schedule', required — What will cause this transform to be rebuilt from now on. `orchestration` — it runs as part of an Orchestration Workflow. `schedule` — it runs on its own `cron_expression`. `not_scheduled` — it is deliberately set to build once and never update. `not_applicable` — it is a view, which has no independent build; a view is always current because it is a query, not a stored table. `none` — nothing will rebuild it and that is not intentional: either it is still a draft, or it is a published table that lost its schedule, which can happen after detaching it from a workflow. `none` is the only value that indicates a problem, so to find transforms that have silently stopped building look for status "published" with rebuild_trigger "none".
  - `cron_expression` string, nullable — Cron expression (UTC) configured as the transform's own materialization schedule, or null if none has been set. It is only *acted on* while the transform is published, materialized as a "table", and not attached to an Orchestration Workflow. It is still reported in the other cases — a draft, a view, or a transform running as part of a workflow (see orchestration_workflow_id) — so you can see the schedule the transform would fall back to once it is published as a table again or detached from the workflow. Read rebuild_trigger to tell whether it is currently in effect: it reports "schedule" exactly when this cron is what rebuilds the transform.
  - `created_at` string, date-time, required — The datetime when the transform was created.
  - `updated_at` string, date-time, required — The datetime when the transform was last updated.

## Other responses

- `404` — Transform not found.

## Changes

- **2026-08-28** `1524bf3975ae` — 1 info
  - added the required property `rebuild_trigger` to the response with the `200` status
- **2026-08-28** `7242a991f033` — 2 info
  - added the optional property `draft_sql_template` to the response with the `200` status
  - added the required property `has_unpublished_changes` to the response with the `200` status
- **2026-08-13** `75294f591cc2` — 2 info
  - added the new optional request property `cron_expression`
  - added the optional property `cron_expression` to the response with the `200` status

[Change history](https://skmtc.dev/weld/apis/weld-rest-api/changes/transforms/:id/patch.md)

---

[API](https://skmtc.dev/weld/apis/weld-rest-api.md) · [All operations](https://skmtc.dev/weld/apis/weld-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/weld/weld-rest-api/revisions/1524bf3975ae/schema)
