Skip to main content

Validate Program

Validate a SQL program by compiling it, without creating a pipeline or building the pipeline binary. Reports SQL errors and warnings and the derived schema and connectors. Set ir to also return the program IR (dataflow).

Note that this endpoint returns HTTP 200, regardless of whether validation succeeds or fails. The validation result, including any compiler warnings and errors, is encoded in the ValidateProgramResponse response body.

Request Body REQUIRED

The SQL program to validate, an optional runtime version, and whether to return the IR

ir boolean

Return the program IR (dataflow) in the response. false by default; most callers only need to know whether the program is valid.

program_code string REQUIRED

SQL program code to validate.

runtime_version string

Runtime version to compile with: a version tag (vX.Y.Z) or a 40-character git SHA. If omitted, the platform's default runtime is used.

Responses
200

Validation completed; the body reports success, SQL errors, or a system error

Schema OPTIONAL
undefined

Outcome of validating a SQL program.

400

The requested runtime version is invalid

Schema OPTIONAL
details

Detailed error metadata. The contents of this field is determined by error_code.

error_code string

Error code is a string that specifies this error type.

message string

Human-readable error message.

500
Schema OPTIONAL
details

Detailed error metadata. The contents of this field is determined by error_code.

error_code string

Error code is a string that specifies this error type.

message string

Human-readable error message.

503

The compiler service is unavailable

Schema OPTIONAL
details

Detailed error metadata. The contents of this field is determined by error_code.

error_code string

Error code is a string that specifies this error type.

message string

Human-readable error message.

504

The compiler did not respond within the configured timeout

Schema OPTIONAL
details

Detailed error metadata. The contents of this field is determined by error_code.

error_code string

Error code is a string that specifies this error type.

message string

Human-readable error message.