Query SQL execution records¶
Query SQL execution records by condition to locate executions that require further investigation. To actively submit or cancel SQL, or obtain the result of an execution, see Execute SQL and manage SQL metadata.
Prerequisites¶
Prepare credentials that can access the target workspace. For service endpoints, authentication, and general request formats, see Make your first AI Studio API call.
To narrow the query, prepare known filters such as execution, workspace, or time. The available conditions are defined by the action page.
Call sequence¶
View the SQL history overview or SQL execution records for the investigation scope, then locate the target execution in the returned records.
To inspect the statement text, status, duration, error, or execution plan, record the statement ID and execution time, then view execution details or the execution profile.
To inspect the execution status or result, open the SQL execution scenario and use the corresponding status or result operation.
API operations¶
Task |
Use it when |
|---|---|
Aggregate execution-record totals by time range and SQL source. |
|
Browse or filter existing SQL execution records. |
|
You have the statement ID and execution time and need complete execution information. |
|
You have the statement ID and execution time and need to analyze execution steps and resource use. |
Confirm the result¶
Check that the overview or returned records cover the target scope and execution. After locating the target, use Get SQL execution details, get the SQL execution profile, get execution status, and get execution result to continue confirming the execution and result.