write_transformations
Manage SQL transformations for ELT processing by creating, updating, or deleting them with configurable triggers and execution settings.
Instructions
Create, update, or delete SQL transformations for ELT processing.
RETURNS:
create: New transformation details
update: Updated configuration
delete: Confirmation of removal
COMMON ERRORS:
"Invalid SQL syntax" - Check destination SQL dialect
"Connection not found" - Verify destination connection
"Trigger job not found" - Check job name for AfterJob mode
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Operation to perform | |
| transformationName | Yes | Unique transformation name. Use descriptive names like 'Daily_Sales_Aggregation' | |
| connection | No | Destination connection where SQL will execute (required for create). Can differ from job destinations. | |
| queries | No | SQL queries to execute. Run in order. Can include DDL, DML, stored procedures. Use destination SQL dialect. | |
| transformationTriggerMode | No | When to run: 'None' (manual only), 'Scheduled' (use cron), 'AfterJob' (after job success) | |
| scheduledCron | No | Unix cron format (minute hour day month weekday) Examples: - "0 6 * * *" - 6 AM daily - "30 */4 * * *" - Every 4 hours at :30 - "0 0 * * 1" - Midnight every Monday | |
| triggerAfterJob | No | Job name that triggers this transformation (when mode is 'AfterJob'). Job must succeed. | |
| triggerTasks | No | Comma-separated task IDs to wait for (optional - waits for entire job if not specified) | |
| verbosity | No | Log level: 1=Error, 2=Info, 3=Transfer, 4=Verbose | |
| sendEmailNotification | No | Send email after transformation completes | |
| emailErrorOnly | No | Only send email on transformation failure | |
| notifyEmailTo | No | Email recipient(s) for notifications | |
| notifyEmailSubject | No | Email subject line | |
| workspaceId | No | Workspace ID to use for this operation. Overrides the default workspace. Use 'default' for the default workspace or a UUID for specific workspaces. |