# Batch monitoring

> Batch monitoring - A Batch Monitoring Job is used to monitor data sets outside DataRobot app.

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-05-06T18:17:09.819903+00:00` (UTC).

## Primary page

- [Batch monitoring](https://docs.datarobot.com/en/docs/api/reference/sdk/batch-monitoring.html): Full documentation for this topic (HTML).

## Sections on this page

- [classdatarobot.models.BatchMonitoringJob](https://docs.datarobot.com/en/docs/api/reference/sdk/batch-monitoring.html#datarobot.models.BatchMonitoringJob): In-page section heading.
- [classmethodget(project_id, job_id)](https://docs.datarobot.com/en/docs/api/reference/sdk/batch-monitoring.html#datarobot.models.BatchMonitoringJob.get): In-page section heading.
- [download(fileobj, timeout=120, read_timeout=660)](https://docs.datarobot.com/en/docs/api/reference/sdk/batch-monitoring.html#datarobot.models.BatchMonitoringJob.download): In-page section heading.
- [classmethodrun(deployment, intake_settings=None, output_settings=None, csv_settings=None, num_concurrent=None, chunk_size=None, abort_on_error=True, monitoring_aggregation=None, monitoring_columns=None, monitoring_output_settings=None, download_timeout=120, download_read_timeout=660, upload_read_timeout=600)](https://docs.datarobot.com/en/docs/api/reference/sdk/batch-monitoring.html#datarobot.models.BatchMonitoringJob.run): In-page section heading.
- [cancel(ignore_404_errors=False)](https://docs.datarobot.com/en/docs/api/reference/sdk/batch-monitoring.html#datarobot.models.BatchMonitoringJob.cancel): In-page section heading.
- [get_status()](https://docs.datarobot.com/en/docs/api/reference/sdk/batch-monitoring.html#datarobot.models.BatchMonitoringJob.get_status): In-page section heading.
- [classdatarobot.models.BatchMonitoringJobDefinition](https://docs.datarobot.com/en/docs/api/reference/sdk/batch-monitoring.html#datarobot.models.BatchMonitoringJobDefinition): In-page section heading.
- [classmethodget(batch_monitoring_job_definition_id)](https://docs.datarobot.com/en/docs/api/reference/sdk/batch-monitoring.html#datarobot.models.BatchMonitoringJobDefinition.get): In-page section heading.
- [classmethodlist()](https://docs.datarobot.com/en/docs/api/reference/sdk/batch-monitoring.html#datarobot.models.BatchMonitoringJobDefinition.list): In-page section heading.
- [classmethodcreate(enabled, batch_monitoring_job, name=None, schedule=None)](https://docs.datarobot.com/en/docs/api/reference/sdk/batch-monitoring.html#datarobot.models.BatchMonitoringJobDefinition.create): In-page section heading.
- [update(enabled, batch_monitoring_job=None, name=None, schedule=None)](https://docs.datarobot.com/en/docs/api/reference/sdk/batch-monitoring.html#datarobot.models.BatchMonitoringJobDefinition.update): In-page section heading.
- [run_on_schedule(schedule)](https://docs.datarobot.com/en/docs/api/reference/sdk/batch-monitoring.html#datarobot.models.BatchMonitoringJobDefinition.run_on_schedule): In-page section heading.
- [run_once()](https://docs.datarobot.com/en/docs/api/reference/sdk/batch-monitoring.html#datarobot.models.BatchMonitoringJobDefinition.run_once): In-page section heading.
- [delete()](https://docs.datarobot.com/en/docs/api/reference/sdk/batch-monitoring.html#datarobot.models.BatchMonitoringJobDefinition.delete): In-page section heading.

## Related documentation

- [Developer documentation](https://docs.datarobot.com/en/docs/api/index.html): Linked from this page.
- [API reference](https://docs.datarobot.com/en/docs/api/reference/index.html): Linked from this page.
- [Python API client](https://docs.datarobot.com/en/docs/api/reference/sdk/index.html): Linked from this page.
- [Monitoring](https://docs.datarobot.com/en/docs/api/reference/sdk/tag-observability.html): Linked from this page.
- [Deployment](https://docs.datarobot.com/en/docs/api/reference/sdk/deployment-management.html#datarobot.models.Deployment): Linked from this page.
- [Database Connectivity](https://docs.datarobot.com/en/docs/api/dev-learning/python/data/database_connectivity.html#database-connectivity-overview): Linked from this page.
- [Credentials](https://docs.datarobot.com/en/docs/api/dev-learning/python/admin/credentials.html#credentials-api-doc): Linked from this page.

## Documentation content

### class datarobot.models.BatchMonitoringJob

A Batch Monitoring Job is used to monitor data sets outside DataRobot app.

- Variables: id ( str ) – the ID of the job

#### classmethod get(project_id, job_id)

Get batch monitoring job

- Variables: job_id ( str ) – ID of batch job
- Returns: Instance of BatchMonitoringJob
- Return type: BatchMonitoringJob

#### download(fileobj, timeout=120, read_timeout=660)

Downloads the results of a monitoring job as a CSV.

- Variables:

#### classmethod run(deployment, intake_settings=None, output_settings=None, csv_settings=None, num_concurrent=None, chunk_size=None, abort_on_error=True, monitoring_aggregation=None, monitoring_columns=None, monitoring_output_settings=None, download_timeout=120, download_read_timeout=660, upload_read_timeout=600)

Create new batch monitoring job, upload the dataset, and
return a batch monitoring job.

- Variables:

> [!NOTE] Examples
> ```
> >>> import datarobot as dr
> >>> job_spec = {
> ...     "intake_settings": {
> ...         "type": "jdbc",
> ...         "data_store_id": "645043933d4fbc3215f17e34",
> ...         "catalog": "SANDBOX",
> ...         "table": "10kDiabetes_output_actuals",
> ...         "schema": "SCORING_CODE_UDF_SCHEMA",
> ...         "credential_id": "645043b61a158045f66fb329"
> ...     },
> >>>     "monitoring_columns": {
> ...         "predictions_columns": [
> ...             {
> ...                 "class_name": "True",
> ...                 "column_name": "readmitted_True_PREDICTION"
> ...             },
> ...             {
> ...                 "class_name": "False",
> ...                 "column_name": "readmitted_False_PREDICTION"
> ...             }
> ...         ],
> ...         "association_id_column": "rowID",
> ...         "actuals_value_column": "ACTUALS"
> ...     }
> ... }
> >>> deployment_id = "foobar"
> >>> job = dr.BatchMonitoringJob.run(deployment_id, **job_spec)
> >>> job.wait_for_completion()
> ```

#### cancel(ignore_404_errors=False)

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

- Return type: None

#### get_status()

Get status of batch monitoring job

- Returns: Dict with job status
- Return type: BatchMonitoringJob status data

### class datarobot.models.BatchMonitoringJobDefinition

#### classmethod get(batch_monitoring_job_definition_id)

Get batch monitoring job definition

- Variables: batch_monitoring_job_definition_id ( str ) – ID of batch monitoring job definition
- Returns: Instance of BatchMonitoringJobDefinition
- Return type: BatchMonitoringJobDefinition

> [!NOTE] Examples
> ```
> >>> import datarobot as dr
> >>> definition = dr.BatchMonitoringJobDefinition.get('5a8ac9ab07a57a0001be501f')
> >>> definition
> BatchMonitoringJobDefinition(60912e09fd1f04e832a575c1)
> ```

#### classmethod list()

Get job all monitoring job definitions

- Returns: List of job definitions the user has access to see
- Return type: List[BatchMonitoringJobDefinition]

> [!NOTE] Examples
> ```
> >>> import datarobot as dr
> >>> definition = dr.BatchMonitoringJobDefinition.list()
> >>> definition
> [
>     BatchMonitoringJobDefinition(60912e09fd1f04e832a575c1),
>     BatchMonitoringJobDefinition(6086ba053f3ef731e81af3ca)
> ]
> ```

#### classmethod create(enabled, batch_monitoring_job, name=None, schedule=None)

Creates a new batch monitoring job definition to be run either at scheduled interval or as
a manual run.

- Variables:

> [!NOTE] Examples
> ```
> >>> import datarobot as dr
> >>> job_spec = {
> ...    "num_concurrent": 4,
> ...    "deployment_id": "foobar",
> ...    "intake_settings": {
> ...        "url": "s3://foobar/123",
> ...        "type": "s3",
> ...        "format": "csv"
> ...    },
> ...    "output_settings": {
> ...        "url": "s3://foobar/123",
> ...        "type": "s3",
> ...        "format": "csv"
> ...    },
> ...}
> >>> schedule = {
> ...    "day_of_week": [
> ...        1
> ...    ],
> ...    "month": [
> ...        "*"
> ...    ],
> ...    "hour": [
> ...        16
> ...    ],
> ...    "minute": [
> ...        0
> ...    ],
> ...    "day_of_month": [
> ...        1
> ...    ]
> ...}
> >>> definition = BatchMonitoringJobDefinition.create(
> ...    enabled=False,
> ...    batch_monitoring_job=job_spec,
> ...    name="some_definition_name",
> ...    schedule=schedule
> ... )
> >>> definition
> BatchMonitoringJobDefinition(60912e09fd1f04e832a575c1)
> ```

#### update(enabled, batch_monitoring_job=None, name=None, schedule=None)

Updates a job definition with the changed specs.

Takes the same input as [create()](https://docs.datarobot.com/en/docs/api/reference/sdk/batch-monitoring.html#datarobot.models.BatchMonitoringJobDefinition.create)

- Variables:
- Returns: Instance of the updated BatchMonitoringJobDefinition
- Return type: BatchMonitoringJobDefinition

> [!NOTE] Examples
> ```
> >>> import datarobot as dr
> >>> job_spec = {
> ...    "num_concurrent": 5,
> ...    "deployment_id": "foobar_new",
> ...    "intake_settings": {
> ...        "url": "s3://foobar/123",
> ...        "type": "s3",
> ...        "format": "csv"
> ...    },
> ...    "output_settings": {
> ...        "url": "s3://foobar/123",
> ...        "type": "s3",
> ...        "format": "csv"
> ...    },
> ...}
> >>> schedule = {
> ...    "day_of_week": [
> ...        1
> ...    ],
> ...    "month": [
> ...        "*"
> ...    ],
> ...    "hour": [
> ...        "*"
> ...    ],
> ...    "minute": [
> ...        30, 59
> ...    ],
> ...    "day_of_month": [
> ...        1, 2, 6
> ...    ]
> ...}
> >>> definition = BatchMonitoringJobDefinition.create(
> ...    enabled=False,
> ...    batch_monitoring_job=job_spec,
> ...    name="updated_definition_name",
> ...    schedule=schedule
> ... )
> >>> definition
> BatchMonitoringJobDefinition(60912e09fd1f04e832a575c1)
> ```

#### run_on_schedule(schedule)

Sets the run schedule of an already created job definition.

If the job was previously not enabled, this will also set the job to enabled.

- Variables: schedule ( dict ) – Same as schedule in create() .
- Returns: Instance of the updated BatchMonitoringJobDefinition with the new / updated schedule.
- Return type: BatchMonitoringJobDefinition

> [!NOTE] Examples
> ```
> >>> import datarobot as dr
> >>> definition = dr.BatchMonitoringJobDefinition.create('...')
> >>> schedule = {
> ...    "day_of_week": [
> ...        1
> ...    ],
> ...    "month": [
> ...        "*"
> ...    ],
> ...    "hour": [
> ...        "*"
> ...    ],
> ...    "minute": [
> ...        30, 59
> ...    ],
> ...    "day_of_month": [
> ...        1, 2, 6
> ...    ]
> ...}
> >>> definition.run_on_schedule(schedule)
> BatchMonitoringJobDefinition(60912e09fd1f04e832a575c1)
> ```

#### run_once()

Manually submits a batch monitoring job to the queue, based off of an already
created job definition.

- Returns: Instance of BatchMonitoringJob
- Return type: BatchMonitoringJob

> [!NOTE] Examples
> ```
> >>> import datarobot as dr
> >>> definition = dr.BatchMonitoringJobDefinition.create('...')
> >>> job = definition.run_once()
> >>> job.wait_for_completion()
> ```

#### delete()

Deletes the job definition and disables any future schedules of this job if any.
If a scheduled job is currently running, this will not be cancelled.

> [!NOTE] Examples
> ```
> >>> import datarobot as dr
> >>> definition = dr.BatchMonitoringJobDefinition.get('5a8ac9ab07a57a0001be501f')
> >>> definition.delete()
> ```

- Return type: None
