RunSemanticJob

Updated at:

Submits a saved semantic job for execution by name and returns the run and executor identifiers. A successful call indicates that the job has been submitted, not that the semantic model results have been generated.

Operation description

Description

Loads a saved semantic job definition by Name and submits a new analysis run to the executor. This operation does not accept runtime overrides for Source, resource groups, or reference files. The execution always uses the configuration saved by CreateSemanticJob.

Pre-execution validation

The service validates the existence and access permissions of the job, and re-validates whether the associated files still exist. For files associated through ReferenceFileIds, the service resolves them into temporary addresses readable by the current run before submission. If a file is deleted after upload or an invalid file ID is specified, the submission fails.

Response and What to do next

Data.JobRunId is the identity of the current semantics job run and is used by DownloadSemanticResults to download the exact output of this run. Data.ExecutorJobId is the identity of the executor job and is used by GetSemanticJobDetail, GetSemanticJobLog, and KillSemanticJob. A successful response indicates that the executor has accepted the submission, not that the model analysis or result files are complete.

Billing

Before using this operation, make sure that you fully understand the billing method and pricing of the model calls used by semantic construction.

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:RunSemanticJob

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Name

string

Yes

The name of the job to run. Use the Data.Name value from the CreateSemanticJob response or the Name value from a ListSemanticJobs list item. The Source, ResourceGroupId, and reference files of the job are determined by the definition saved at creation time.

semantic-job-demo

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

Response elements

Element

Type

Description

Example

object

The standard response for submitting a semantic job run. The two identifiers in Data are used for result download and executor queries, respectively.

RequestId

string

The request ID. Used for locating logs and troubleshooting issues.

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

Success

boolean

Indicates whether the request was successful.

Data

object

The run information for this submission. A successful submission does not mean that the semantic model output has been generated. Use the detail operation to confirm the status before downloading results.

JobRunId

string

The unique identifier of this run. Pass this value to the JobRunId parameter of DownloadSemanticResults to obtain the output of this run.

01H00000000000000000000000

ExecutorJobId

string

The executor task identifier. Pass this value to the ExecutorJobId parameter of GetSemanticJobDetail, GetSemanticJobLog, or KillSemanticJob.

exec-job-demo

CurrentSqlIndex

integer

The current SQL fragment index returned by the executor in the submission response.

0

ExecTypes

array

The list of execution type codes returned by the executor in the submission response.

integer

The list of execution type codes returned by the executor.

6

Env

string

The runtime environment identifier returned by the executor in the submission response.

PROD

Statuses

array

The list of status codes returned by the executor in the submission response. The status at the submission stage does not indicate that the results are complete.

integer

The list of task status codes returned by the executor. A success status includes 3.

3

For the meaning of response fields and their relationships with subsequent calls, refer to the description of each field.

Examples

Success response

JSON format

{
  "RequestId": "676271D6-53B4-57BE-89FA-72F7AE1418DF",
  "Success": false,
  "Data": {
    "JobRunId": "01H00000000000000000000000",
    "ExecutorJobId": "exec-job-demo",
    "CurrentSqlIndex": 0,
    "ExecTypes": [
      6
    ],
    "Env": "PROD",
    "Statuses": [
      3
    ]
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.