5.2.16. xgt.JobFilter¶
- class xgt.JobFilter(status: str | Iterable[str] | None = None, start_date: datetime | None = None, end_date: datetime | None = None, description: str | None = None, user: str | None = None, dataset: str | None = None, min_runtime_s: float | None = None, max_runtime_s: float | None = None, min_num_rows: int | None = None, max_num_rows: int | None = None, min_job_id: int | None = None, max_job_id: int | None = None, offset: int = 0, limit: int = 0, newest_first: bool = False)¶
Filter criteria for
Connection.get_jobs()andConnection.get_job_stats().All fields are optional; unset fields impose no constraint.
Added in version 2.7.0.
- Parameters:
status (str | Iterable[str] | None) – Comma-separated string or iterable of lowercase status names (e.g.
"completed,failed").start_date (datetime | None) – Only include jobs that began running on or after this value. Jobs that have not started running yet are excluded. Must be timezone-aware.
end_date (datetime | None) – Only include jobs whose end time is on or before this value. Must be timezone-aware.
description (str | None) – Case-insensitive substring match on job description.
user (str | None) – Case-insensitive substring match on job user.
dataset (str | None) – Case-insensitive substring match on default namespace / graph.
min_runtime_s (float | None) – Only include jobs whose runtime is at least this many seconds.
max_runtime_s (float | None) – Only include jobs whose runtime is at most this many seconds.
min_num_rows (int | None) – Only include jobs that produced at least this many rows.
max_num_rows (int | None) – Only include jobs that produced at most this many rows.
min_job_id (int | None) – Only include jobs with ID >= this value.
max_job_id (int | None) – Only include jobs with ID <= this value.
offset (int) – Zero-based index of the first result to return. Defaults to 0. Ignored by
Connection.get_job_stats().limit (int) – Maximum number of results to return. 0 means no limit. Ignored by
Connection.get_job_stats().newest_first (bool) – When
True, results are sorted newest job first (descending ID). Defaults toFalse(ascending ID, oldest first), which matches the historical behavior ofConnection.get_jobs(). Ignored byConnection.get_job_stats().
Attributes
Case-insensitive substring match on the default namespace / graph.
Case-insensitive substring match on the job description.
Include only jobs whose end time is at or before this time (tz-aware).
Maximum number of results to return; 0 means no limit.
Include only jobs with ID <= this value.
Include only jobs that produced at most this many rows.
Include only jobs whose runtime is at most this many seconds.
Include only jobs with ID >= this value.
Include only jobs that produced at least this many rows.
Include only jobs whose runtime is at least this many seconds.
Sort newest job first (descending ID) when True; default is oldest first.
Zero-based index of the first result to return.
Include only jobs that began running at or after this time (tz-aware).
Statuses to include, as a comma-separated string or iterable of lowercase names.
Case-insensitive substring match on the job's user.
- dataset: str | None = None¶
Case-insensitive substring match on the default namespace / graph.
- description: str | None = None¶
Case-insensitive substring match on the job description.
- end_date: datetime | None = None¶
Include only jobs whose end time is at or before this time (tz-aware).
- limit: int = 0¶
Maximum number of results to return; 0 means no limit.
- max_job_id: int | None = None¶
Include only jobs with ID <= this value.
- max_num_rows: int | None = None¶
Include only jobs that produced at most this many rows.
- max_runtime_s: float | None = None¶
Include only jobs whose runtime is at most this many seconds.
- min_job_id: int | None = None¶
Include only jobs with ID >= this value.
- min_num_rows: int | None = None¶
Include only jobs that produced at least this many rows.
- min_runtime_s: float | None = None¶
Include only jobs whose runtime is at least this many seconds.
- newest_first: bool = False¶
Sort newest job first (descending ID) when True; default is oldest first.
- offset: int = 0¶
Zero-based index of the first result to return.
- start_date: datetime | None = None¶
Include only jobs that began running at or after this time (tz-aware).
- status: str | Iterable[str] | None = None¶
Statuses to include, as a comma-separated string or iterable of lowercase names.
- user: str | None = None¶
Case-insensitive substring match on the job’s user.