write_jobs
Create, update, or delete data replication jobs in CData Sync to move data between sources and destinations with scheduling, transformations, and error handling.
Instructions
Create, modify, or delete data replication jobs. If not authenticated with CData Sync, you will be prompted for credentials. Jobs orchestrate moving data from source to destination with options for scheduling, transformations, error handling, and notifications. IMPORTANT: Use table names exactly as reported by the source connection - do not modify names or extensions. Job types: Standard=Basic replication, ReplicateAll=Sync all tables, LoadFolder=File-based, ChangeDataCapture=CDC, ReverseETL=Reverse sync, EnhancedChangeDataCapture=Enhanced CDC. Cannot modify/delete running jobs. Add tasks after creating the job.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Operation to perform. Create new jobs, update settings, or delete stopped jobs | |
| jobName | Yes | Unique job name. Use descriptive names indicating purpose/frequency (e.g., 'Hourly_Customer_Sync') | |
| source | No | Source connection name (required for create). Must be an existing, tested connection. | |
| destination | No | Destination connection name (required for create). Must be an existing, tested connection. | |
| type | No | Job type: Standard=Basic replication, ReplicateAll=Sync all tables, LoadFolder=File-based, ChangeDataCapture=CDC, ReverseETL=Reverse sync, EnhancedChangeDataCapture=Enhanced CDC | |
| queries | No | SQL queries for tasks. Use 'REPLICATE [TableName]' for full table copy using exact source table names, or write custom SQL with filters/joins. Table names must match exactly what the source reports. | |
| scheduled | No | Enable scheduled execution. When true, also set scheduledCron. | |
| scheduledCron | No | Unix cron expression for scheduling (e.g., '0 */2 * * *' for every 2 hours). Runs as job creator. | |
| verbosity | No | Log detail level: 1=Error only, 2=Info (default), 3=Transfer details, 4=Verbose/Debug | |
| batchSize | No | Records per batch. Larger = faster but more memory. Provider-specific optimal values. | |
| commandTimeout | No | Seconds before query timeout. Increase for long-running operations. | |
| continueOnError | No | Continue processing remaining tasks if one fails. Useful for independent tables. | |
| dropTable | No | Drop and recreate destination table each run. Handles schema changes but loses indexes/constraints. | |
| truncateTableData | No | Delete all destination rows before each sync (full refresh). Slower but ensures consistency. | |
| alterSchema | No | Automatically add columns and modify data types when source schema changes | |
| autoTruncateStrings | No | Automatically truncate strings exceeding destination column size instead of failing | |
| skipDeleted | No | Ignore deleted records in source (if supported). Improves performance but may leave orphaned data. | |
| useGmtDateTime | No | Use GMT/UTC for all timestamps instead of local server time | |
| tableNamePrefix | No | Prefix for all destination tables (e.g., 'staging_' creates 'staging_customers') | |
| cacheSchema | No | Override destination schema name (e.g., 'analytics' instead of default 'dbo') | |
| replicateStartDate | No | Start replicating from this date (yyyy-MM-dd). Useful for historical data limits. | |
| replicateInterval | No | Chunk size for data replication (e.g., '30' with 'days' = 30-day chunks). Improves resume capability. | |
| replicateIntervalUnit | No | Unit for replication interval: minutes, hours, days (default), weeks, months, years | |
| sendEmailNotification | No | Send email after job completion. Requires email configuration. | |
| emailErrorOnly | No | Only send email on job failure (reduces notification noise) | |
| notifyEmailTo | No | Email recipient(s) for notifications. Comma-separate multiple addresses. | |
| notifyEmailSubject | No | Custom email subject. Can include job name/status variables. | |
| notifyWindowsEvent | No | Write errors to Windows Event Log (Windows servers only) | |
| preJob | No | SQL/code to execute before job starts. Use for setup/validation. | |
| postJob | No | SQL/code to execute after job completes. Use for cleanup/notifications. | |
| otherCacheOptions | No | Additional provider-specific options (comma-separated key=value pairs) | |
| 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. |