Introspect query status
CREATE, DROP, and TERMINATE statements returns an object that indicates the current state of statement execution. A statement can be in one of the following states:
- QUEUED, PARSING, EXECUTING: The statement was accepted by the server and is being processed.
- SUCCESS: The statement was successfully processed.
- ERROR: There was an error processing the statement. The statement was not executed.
- TERMINATED: The query started by the statement was terminated. Only
returned for
CREATE STREAM|TABLE AS SELECT
.
If a CREATE, DROP, or TERMINATE statement returns a command status with
state QUEUED, PARSING, or EXECUTING from the /ksql
endpoint, you can
use the /status
endpoint to poll the status of the command.
- GET /status/(string:commandId)
-
Get the current command status for a CREATE, DROP, or TERMINATE statement.
Parameters:
- commandId (string): The command ID of the statement. This ID is returned by the /ksql endpoint.
Response JSON Object:
- status (string): One of QUEUED, PARSING, EXECUTING, TERMINATED, SUCCESS, or ERROR.
- message (string): Detailed message regarding the status of the execution statement.
Example request
1 2 3 |
|
Example response
1 2 3 4 5 6 7 |
|
Last update:
2020-10-19