# Jobs

> Jobs - Tracks asynchronous work being done within a project

This Markdown file sits beside the HTML page at the same path (with a `.md` suffix). It summarizes the topic and lists links for tools and LLM context.

Companion generated at `2026-07-27T18:44:30.552998+00:00` (UTC).

## Primary page

- [Jobs](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md): Full documentation for this topic (Markdown sidecar).

## Sections on this page

- [Job](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.Job): In-page section heading.
- [get()](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.Job.get): In-page section heading.
- [cancel()](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.Job.cancel): In-page section heading.
- [get_result()](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.Job.get_result): In-page section heading.
- [get_result_when_complete()](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.Job.get_result_when_complete): In-page section heading.
- [refresh()](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.Job.refresh): In-page section heading.
- [wait_for_completion()](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.Job.wait_for_completion): In-page section heading.
- [TrainingPredictionsJob](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.TrainingPredictionsJob): In-page section heading.
- [get()](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.TrainingPredictionsJob.get): In-page section heading.
- [refresh()](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.TrainingPredictionsJob.refresh): In-page section heading.
- [cancel()](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.TrainingPredictionsJob.cancel): In-page section heading.
- [get_result()](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.TrainingPredictionsJob.get_result): In-page section heading.
- [get_result_when_complete()](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.TrainingPredictionsJob.get_result_when_complete): In-page section heading.
- [wait_for_completion()](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.TrainingPredictionsJob.wait_for_completion): In-page section heading.
- [ShapMatrixJob](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.ShapMatrixJob): In-page section heading.
- [get()](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.ShapMatrixJob.get): In-page section heading.
- [refresh()](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.ShapMatrixJob.refresh): In-page section heading.
- [cancel()](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.ShapMatrixJob.cancel): In-page section heading.
- [get_result()](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.ShapMatrixJob.get_result): In-page section heading.
- [get_result_when_complete()](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.ShapMatrixJob.get_result_when_complete): In-page section heading.
- [wait_for_completion()](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.ShapMatrixJob.wait_for_completion): In-page section heading.
- [FeatureImpactJob](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.FeatureImpactJob): In-page section heading.
- [get()](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.FeatureImpactJob.get): In-page section heading.
- [cancel()](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.FeatureImpactJob.cancel): In-page section heading.
- [get_result()](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.FeatureImpactJob.get_result): In-page section heading.
- [get_result_when_complete()](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.FeatureImpactJob.get_result_when_complete): In-page section heading.
- [refresh()](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.FeatureImpactJob.refresh): In-page section heading.
- [wait_for_completion()](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.FeatureImpactJob.wait_for_completion): In-page section heading.

## Documentation content

### Job

Tracks asynchronous work being done within a project

Variables

| Attribute | Type | Description |
| --- | --- | --- |
| id | int | The ID of the job |
| project_id | str | The ID of the project the job belongs to |
| status | str | The status of the job - will be one of datarobot.enums.QUEUE_STATUS |
| job_type | str | What kind of work the job is doing - will be one of datarobot.enums.JOB_TYPE |
| is_blocked | bool | If true, the job is blocked (cannot be executed) until its dependencies are resolved |

#### get()

Fetches one job.

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| project_id | str | The identifier of the project in which the job resides |
| job_id | str | The job id |

Returns

| Returns | Description |
| --- | --- |
| job | The job |

Return type: [Job](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.Job)

Raises

| Exception | Description |
| --- | --- |
| AsyncFailureError | Querying this resource gave a status code other than 200 or 303 |

#### cancel()

Cancel this job. If this job has not finished running, it will be
removed and canceled.

Return type: `None`

#### get_result()

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| params | dict or None | Query parameters to be added to request to get results. |

> [!NOTE] Notes
> For featureEffects, source param is required to define source,
> otherwise the default is training.

Returns

| Returns | Description |
| --- | --- |
| result | Return type depends on the job type : - for model jobs, a Model is returned - for predict jobs, a pandas.DataFrame (with predictions) is returned - for featureImpact jobs, a list of dicts by default (see with_metadata parameter of the FeatureImpactJob class and its get() method). - for primeRulesets jobs, a list of Rulesets - for primeModel jobs, a PrimeModel - for primeDownloadValidation jobs, a PrimeFile - for predictionExplanationInitialization jobs, a PredictionExplanationsInitialization - for predictionExplanations jobs, a PredictionExplanations - for featureEffects, a FeatureEffects. |

Return type: `object`

Raises

| Exception | Description |
| --- | --- |
| JobNotFinished | If the job is not finished, the result is not available. |
| AsyncProcessUnsuccessfulError | If the job errored or was aborted |

#### get_result_when_complete()

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| max_wait | Optional[int] | How long to wait for the job to finish. |
| params | dict, optional | Query parameters to be added to request. |

Returns

| Returns | Description |
| --- | --- |
| result | Return type is the same as would be returned by Job.get_result. |

Return type: `object`

Raises

| Exception | Description |
| --- | --- |
| AsyncTimeoutError | If the job does not finish in time |
| AsyncProcessUnsuccessfulError | If the job errored or was aborted |

#### refresh()

Update this object with the latest job data from the server.

Return type: `None`

#### wait_for_completion()

Waits for job to complete.

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| max_wait | Optional[int] | How long to wait for the job to finish. |

Return type: `None`

### TrainingPredictionsJob

#### get()

Fetches one training predictions job.

The resulting [TrainingPredictions](https://docs.datarobot.com/ja/docs/api/reference/sdk/training_predictions.html.md#datarobot.models.training_predictions.TrainingPredictions) object will be annotated with model_id and data_subset.

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| project_id | str | The identifier of the project in which the job resides |
| job_id | str | The job id |
| model_id | str | The identifier of the model used for computing training predictions |
| data_subset | dr.enums.DATA_SUBSET, optional | Data subset used for computing training predictions |

Returns

| Returns | Description |
| --- | --- |
| job | The job |

Return type: [TrainingPredictionsJob](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.TrainingPredictionsJob)

#### refresh()

Update this object with the latest job data from the server.

Return type: `None`

#### cancel()

Cancel this job. If this job has not finished running, it will be
removed and canceled.

Return type: `None`

#### get_result()

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| params | dict or None | Query parameters to be added to request to get results. |

> [!NOTE] Notes
> For featureEffects, source param is required to define source,
> otherwise the default is training.

Returns

| Returns | Description |
| --- | --- |
| result | Return type depends on the job type : - for model jobs, a Model is returned - for predict jobs, a pandas.DataFrame (with predictions) is returned - for featureImpact jobs, a list of dicts by default (see with_metadata parameter of the FeatureImpactJob class and its get() method). - for primeRulesets jobs, a list of Rulesets - for primeModel jobs, a PrimeModel - for primeDownloadValidation jobs, a PrimeFile - for predictionExplanationInitialization jobs, a PredictionExplanationsInitialization - for predictionExplanations jobs, a PredictionExplanations - for featureEffects, a FeatureEffects. |

Return type: `object`

Raises

| Exception | Description |
| --- | --- |
| JobNotFinished | If the job is not finished, the result is not available. |
| AsyncProcessUnsuccessfulError | If the job errored or was aborted |

#### get_result_when_complete()

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| max_wait | Optional[int] | How long to wait for the job to finish. |
| params | dict, optional | Query parameters to be added to request. |

Returns

| Returns | Description |
| --- | --- |
| result | Return type is the same as would be returned by Job.get_result. |

Return type: `object`

Raises

| Exception | Description |
| --- | --- |
| AsyncTimeoutError | If the job does not finish in time |
| AsyncProcessUnsuccessfulError | If the job errored or was aborted |

#### wait_for_completion()

Waits for job to complete.

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| max_wait | Optional[int] | How long to wait for the job to finish. |

Return type: `None`

### ShapMatrixJob

#### get()

Fetches one SHAP matrix job.

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| project_id | str | The identifier of the project in which the job resides |
| job_id | str | The job identifier |
| model_id | str | The identifier of the model used for computing prediction explanations |
| dataset_id | str | The identifier of the dataset against which prediction explanations should be computed |

Returns

| Returns | Description |
| --- | --- |
| job | The job |

Return type: [ShapMatrixJob](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.ShapMatrixJob)

Raises

| Exception | Description |
| --- | --- |
| AsyncFailureError | Querying this resource gave a status code other than 200 or 303 |

#### refresh()

Update this object with the latest job data from the server.

Return type: `None`

#### cancel()

Cancel this job. If this job has not finished running, it will be
removed and canceled.

Return type: `None`

#### get_result()

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| params | dict or None | Query parameters to be added to request to get results. |

> [!NOTE] Notes
> For featureEffects, source param is required to define source,
> otherwise the default is training.

Returns

| Returns | Description |
| --- | --- |
| result | Return type depends on the job type : - for model jobs, a Model is returned - for predict jobs, a pandas.DataFrame (with predictions) is returned - for featureImpact jobs, a list of dicts by default (see with_metadata parameter of the FeatureImpactJob class and its get() method). - for primeRulesets jobs, a list of Rulesets - for primeModel jobs, a PrimeModel - for primeDownloadValidation jobs, a PrimeFile - for predictionExplanationInitialization jobs, a PredictionExplanationsInitialization - for predictionExplanations jobs, a PredictionExplanations - for featureEffects, a FeatureEffects. |

Return type: `object`

Raises

| Exception | Description |
| --- | --- |
| JobNotFinished | If the job is not finished, the result is not available. |
| AsyncProcessUnsuccessfulError | If the job errored or was aborted |

#### get_result_when_complete()

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| max_wait | Optional[int] | How long to wait for the job to finish. |
| params | dict, optional | Query parameters to be added to request. |

Returns

| Returns | Description |
| --- | --- |
| result | Return type is the same as would be returned by Job.get_result. |

Return type: `object`

Raises

| Exception | Description |
| --- | --- |
| AsyncTimeoutError | If the job does not finish in time |
| AsyncProcessUnsuccessfulError | If the job errored or was aborted |

#### wait_for_completion()

Waits for job to complete.

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| max_wait | Optional[int] | How long to wait for the job to finish. |

Return type: `None`

### FeatureImpactJob

Custom Feature Impact job to handle different return value structures.

The original implementation had just the the data and the new one also includes some metadata.

In general, we aim to keep the number of Job classes low by just utilizing the job_type
attribute to control any specific formatting; however in this case when we needed to support
a new representation with the _same_ job_type, customizing the behavior of
_make_result_from_location allowed us to achieve our ends without complicating the
_make_result_from_json method.

#### get()

Fetches one job.

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| project_id | str | The identifier of the project in which the job resides |
| job_id | str | The job id |
| with_metadata | bool | To make this job return the metadata (i.e., the full object of the completed resource) set the with_metadata flag to True. |

Returns

| Returns | Description |
| --- | --- |
| job | The job |

Return type: [Job](https://docs.datarobot.com/ja/docs/api/reference/sdk/jobs.html.md#datarobot.models.Job)

Raises

| Exception | Description |
| --- | --- |
| AsyncFailureError | Querying this resource gave a status code other than 200 or 303 |

#### cancel()

Cancel this job. If this job has not finished running, it will be
removed and canceled.

Return type: `None`

#### get_result()

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| params | dict or None | Query parameters to be added to request to get results. |

> [!NOTE] Notes
> For featureEffects, source param is required to define source,
> otherwise the default is training.

Returns

| Returns | Description |
| --- | --- |
| result | Return type depends on the job type : - for model jobs, a Model is returned - for predict jobs, a pandas.DataFrame (with predictions) is returned - for featureImpact jobs, a list of dicts by default (see with_metadata parameter of the FeatureImpactJob class and its get() method). - for primeRulesets jobs, a list of Rulesets - for primeModel jobs, a PrimeModel - for primeDownloadValidation jobs, a PrimeFile - for predictionExplanationInitialization jobs, a PredictionExplanationsInitialization - for predictionExplanations jobs, a PredictionExplanations - for featureEffects, a FeatureEffects. |

Return type: `object`

Raises

| Exception | Description |
| --- | --- |
| JobNotFinished | If the job is not finished, the result is not available. |
| AsyncProcessUnsuccessfulError | If the job errored or was aborted |

#### get_result_when_complete()

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| max_wait | Optional[int] | How long to wait for the job to finish. |
| params | dict, optional | Query parameters to be added to request. |

Returns

| Returns | Description |
| --- | --- |
| result | Return type is the same as would be returned by Job.get_result. |

Return type: `object`

Raises

| Exception | Description |
| --- | --- |
| AsyncTimeoutError | If the job does not finish in time |
| AsyncProcessUnsuccessfulError | If the job errored or was aborted |

#### refresh()

Update this object with the latest job data from the server.

Return type: `None`

#### wait_for_completion()

Waits for job to complete.

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| max_wait | Optional[int] | How long to wait for the job to finish. |

Return type: `None`
