GetSemanticJobDetail

Updated at:

Queries the executor status and runtime configuration by using the ExecutorJobId returned by RunSemanticJob or ListSemanticJobRuns.

Operation description

Scenarios

Queries the detailed status and runtime information of a specific semantic job run on the executor side to poll the execution progress or troubleshoot run failures.

Call procedure

  1. Call RunSemanticJob or ListSemanticJobRuns to obtain the ExecutorJobId.

  2. Use the ProjectId returned by the job definition as the ProjectId for this operation.

  3. Determine the current status based on the executor details in Data. If the job is still running, you can continue to poll this operation.

Related operations

Call GetSemanticJobLog to retrieve logs. Call KillSemanticJob to stop the run.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dataworks:GetSemanticJobDetail

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

ExecutorJobId

string

Yes

The executor job ID. Use the Data.ExecutorJobId from the RunSemanticJob response or the ExecutorJobId from the ListSemanticJobRuns records.

exec-job-demo

ProjectId

integer

Yes

The ID of the DataWorks workspace to which the job belongs. Use the ProjectId from the CreateSemanticJob response or the ListSemanticJobs list items.

100

Construct the call parameters based on the description of each request field.

Response elements

Element

Type

Description

Example

object

The standard response for querying executor run details. Data contains the executor details currently returned for the specified ExecutorJobId.

RequestId

string

The request ID. You can use this ID to locate logs and troubleshoot issues.

676271D6-53B4-57BE-89FA-72F7AE1418DF

Success

boolean

Indicates whether the request is successful.

Data

object

The job details returned by the executor. You can use these details to determine the run status and view the effective runtime configuration.

ExecutorJobId

string

The executor job ID.

exec-job-demo

FileType

integer

The code of the executor node type. Semantic jobs use the Shell node code 6.

6

ProjectId

integer

The ID of the DataWorks workspace associated with the executor job.

100

Datasource

string

The identifier of the data source used by the executor job.

maxcompute

CodeParameters

string

The code parameter information returned by the executor. You can use this information to troubleshoot the runtime configuration of the current run.

--limit 100

Env

string

The runtime environment identifier returned by the executor.

PROD

CustomerName

string

The customer identifier of the executor job.

meta_semantic

CurrentSqlIndex

integer

The index of the SQL snippet currently processed by the executor.

0

ExecTypes

array

The list of execution type codes returned by the executor.

integer

The list of execution type codes returned by the executor.

6

Statuses

array

The list of status codes returned by the executor. You can use this list to determine the current or final status of the job.

integer

The list of job status codes returned by the executor. A successful status includes 3.

3

AdvanceSettings

object

The advanced runtime settings returned by the executor.

{}

ResourceUrls

array<object>

The list of resource URLs associated with the executor job.

object

The list of resource URLs returned by the executor.

{ "fileName": "resource.jar", "fileUrl": "https://example.com/resources/resource.jar" }

ResourceGroupId

string

The identifier of the resource group that actually executes the job.

rg-demo

Refer to the description of each field for the meaning of response fields and subsequent call relationships.

Examples

Success response

JSON format

{
  "RequestId": "676271D6-53B4-57BE-89FA-72F7AE1418DF",
  "Success": false,
  "Data": {
    "ExecutorJobId": "exec-job-demo",
    "FileType": 6,
    "ProjectId": 100,
    "Datasource": "maxcompute",
    "CodeParameters": "--limit 100",
    "Env": "PROD",
    "CustomerName": "meta_semantic",
    "CurrentSqlIndex": 0,
    "ExecTypes": [
      6
    ],
    "Statuses": [
      3
    ],
    "AdvanceSettings": {},
    "ResourceUrls": [
      {
        "fileName": "resource.jar",
        "fileUrl": "https://example.com/resources/resource.jar"
      }
    ],
    "ResourceGroupId": "rg-demo"
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.