STATUS

Updated at:

Queries the status of a specified instance.

Only the instance owner can query its status. Querying an instance created by another user returns an error.

Syntax

status <instance_id>;

Parameters

Parameter Required Description
instance_id Yes The ID of the instance to query. Each instance ID is unique.

Return result

The command returns one of the following status values:

Status Description
Waiting The instance is queued and waiting to run.
Running The instance is running.
Success The instance completed successfully.
Failed The job failed. Data in the destination table is not modified.
Cancelled The instance was stopped before completion.
Terminated The job completed.

Example

Query the status of a specific instance:

-- Query the status of instance 20131225123xxxxxxxxxxxxxxx
status 20131225123xxxxxxxxxxxxxxx;

If the instance completed successfully, the output is:

Success

See also

  • SHOW: View instance details, including StartTime (accurate to the second), RunTime (in seconds), Status, InstanceID, Owner, and the query statement.

  • TOP INSTANCE: List all instances currently running in a project.

  • KILL: Stop a running instance.

  • DESC INSTANCE: Get full job details for an instance, including SQL, Owner, StartTime, EndTime, and Status.

  • WAIT: Retrieve the run log for a job based on a specified instance ID, including Logview URLs.