ListSemanticJobs

Updated at:

Lists semantic job definitions for the current tenant with pagination. Use Name to run or delete a job, ProjectId to query run details, and Source to verify the input scope.

Operation description

Scenarios

List saved semantic job definitions for the current tenant to display available jobs, select a job to run, or find the workspace that owns a job.

Workflow

  1. Use PageNumber and PageSize to page through Data.SemanticJobs.

  2. Use the Name of a list item to invoke RunSemanticJob, DeleteSemanticJob, or ListSemanticJobRuns.

  3. Use the ProjectId of a list item together with ExecutorJobId to invoke the details, log, and stop operations.

Precautions

This operation returns job definitions. For current run status, call ListSemanticJobRuns.

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

list

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

PageNumber

integer

No

The page number. Pages start from 1. If this parameter is not specified or is set to a value less than or equal to 0, the first page is returned.

1

PageSize

integer

No

The number of job definitions to return on each page. If this parameter is not specified or is set to a value less than or equal to 0, the default value 50 is used. Maximum value: 200.

50

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

Response elements

Element

Type

Description

Example

object

The paginated response. Each item in Data.SemanticJobs is a job definition that you can use to run or query a job.

RequestId

string

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

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

Success

boolean

Indicates whether the request is successful.

Data

object

The paged results of job definitions. Use the Name of a list item to run or delete a job, query its run records, or download its results. Use the ProjectId to query run details and logs, or stop a run.

TotalCount

integer

The total number of job definitions that meet the query conditions in the current tenant.

1

PageNumber

integer

The page number of the returned page. Pages start from 1.

1

PageSize

integer

The number of job definitions returned on each page.

50

SemanticJobs

array<object>

The list of job definitions.

array<object>

A saved semantic job definition. The field meanings are the same as those in the Data field returned by CreateSemanticJob.

Id

integer

The internal unique ID of the job definition.

1

Name

string

The job name. This name is used in RunSemanticJob, DeleteSemanticJob, ListSemanticJobRuns, and DownloadSemanticResults.

semantic-job-demo

UserId

string

The user identifier of the creator of the semantic job.

user-demo

Creator

string

The user identifier of the creator of the semantic job.

user-demo

ProjectId

integer

The ID of the workspace to which the job belongs. This ID is used in GetSemanticJobDetail, GetSemanticJobLog, and KillSemanticJob.

100

Type

string

The data source type saved in the Source.type field of the job.

maxcompute

Source

object

The input data source configuration saved for the job. The job uses this configuration to determine the analysis scope at runtime.

{"type":"maxcompute","domain":"sales","pinnedScopeInfo":[{"type":"project","name":"mc_project"}]}

ReferenceFileIds

array

The list of IDs of the uploaded files associated with the job.

string

The ID of an uploaded reference file.

semantic-job-value

ReferenceFileUris

array

The list of URIs of the external reference files associated with the job.

string

The URI of an accessible reference file.

semantic-job-value

GmtCreate

integer

The creation time. The value is a UNIX timestamp in milliseconds.

1700000000000

GmtModified

integer

The last modification time. The value is a UNIX timestamp in milliseconds.

1700000000000

ResourceGroupId

string

The identifier of the resource group used to run the job.

rg-demo

For the meanings of response fields and subsequent call relationships, refer to the description of each field.

Examples

Success response

JSON format

{
  "RequestId": "676271D6-53B4-57BE-89FA-72F7AE1418DF",
  "Success": false,
  "Data": {
    "TotalCount": 1,
    "PageNumber": 1,
    "PageSize": 50,
    "SemanticJobs": [
      {
        "Id": 1,
        "Name": "semantic-job-demo",
        "UserId": "user-demo",
        "Creator": "user-demo",
        "ProjectId": 100,
        "Type": "maxcompute",
        "Source": {
          "type": "maxcompute",
          "domain": "sales",
          "pinnedScopeInfo": [
            {
              "type": "project",
              "name": "mc_project"
            }
          ]
        },
        "ReferenceFileIds": [
          "semantic-job-value"
        ],
        "ReferenceFileUris": [
          "semantic-job-value"
        ],
        "GmtCreate": 1700000000000,
        "GmtModified": 1700000000000,
        "ResourceGroupId": "rg-demo"
      }
    ]
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.