execute_query
Execute predefined queries within CData Sync jobs for testing or ad-hoc operations. Run existing task queries to validate data synchronization workflows and connections.
Instructions
Execute pre-defined queries within a job context for testing or ad-hoc operations.
IMPORTANT: Can only execute queries already defined as tasks - cannot run arbitrary SQL.
RETURNS:
Success: Query execution results with row counts and timing
Async: Confirmation that queries started
Error: { code: -32603, message: "error details" }
COMMON ERRORS:
"Query not found" - Query must exist as task in job
"Job not found" - Verify job name/ID
"Execution failed" - Check query syntax and connections
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jobName | No | Job context for query execution (defines connections to use) | |
| jobId | No | Alternative: Job UUID for context | |
| queries | Yes | Query names or REPLICATE statements that exist as tasks in the job. Cannot execute arbitrary SQL - must match existing task patterns. | |
| waitForResults | No | Wait for completion (true) or run async (false) | |
| timeout | No | Maximum seconds to wait (0 = unlimited) | |
| 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. |