Skip to main content
Version: v3.0.0

Jobs API

Listing jobs

The List Jobs API returns the jobs that you have started. Jobs are scoped to a workspace, so listing is available in two places:

  • workspace.jobs.list() returns only the jobs belonging to that workspace.
  • client.jobs.list() returns your jobs across every workspace you can access.

Both variants share the same signature and accept the optional arguments feature_set_name_query, status_filter, and job_type_filters. The job_type_filters argument takes a list of job type string values, and feature_set_name_query is matched as a case-insensitive regular expression against the feature set name. list() returns a generator, so it can be iterated directly.

from h2o_featurestore import JobType

workspace = client.workspaces.get("ws-abc123")

# Jobs within a single workspace (preferred)
for job in workspace.jobs.list():
print(job)

# Filter by job type
for job in workspace.jobs.list(job_type_filters=[JobType.INGEST.value]):
print(job)

# Filter by feature set name and status
for job in workspace.jobs.list(feature_set_name_query="transactions", status_filter="Running"):
print(job)

# Across all accessible workspaces
for job in client.jobs.list(job_type_filters=[JobType.INGEST.value]):
print(job)

Available JobType values:

  • JobType.BACKFILL
  • JobType.BATCH_RETRIEVE
  • JobType.COMPUTE_RECOMMENDATION_CLASSIFIERS
  • JobType.COMPUTE_STATISTICS
  • JobType.EXTRACT_SCHEMA
  • JobType.INGEST
  • JobType.MATERIALIZATION_ONLINE
  • JobType.OPTIMIZE_STORAGE
  • JobType.RETRIEVE
  • JobType.REVERT_INGEST
  • JobType.UNKNOWN

Available status_filter values:

  • Created
  • Submitted
  • Pending
  • PendingRerun
  • Running
  • Failing
  • Failed
  • SubmissionFailed
  • Success
  • Cancelling
  • Cancelled
note

list() returns jobs of every status. To restrict the results to jobs that are currently executing, pass status_filter="Running". Active-style filtering is also available per feature set via feature_set.get_active_jobs(job_type=..., active=...). Unlike list(), get_active_jobs accepts either the JobType enum member directly (JobType.INGEST) or its string value (JobType.INGEST.value); job_type_filters only accepts string values.

note

Only top-level jobs are listed. Jobs spawned by another job are not returned as separate entries — they are available through the parent job's childJobIds.

Getting a job

job = client.jobs.get("job_id")

# The workspace-scoped variant returns the same job, already bound to the workspace
job = workspace.jobs.get("job_id")

Job workspace

Every job belongs to the workspace that contains the feature set it operates on.

# Resource name of the owning workspace, for example "workspaces/ws-abc123"
job.parent

# The Workspace object, resolved lazily from the resource name
job.workspace
note

Jobs created before workspace scoping was introduced do not belong to a specific workspace. For these jobs, parent is an empty string and workspace is None.

Cancelling a job

To request cancel without waiting for cancellation to complete you need to call

job.cancel()

To request cancel and wait for cancellation to complete you need to call

job.cancel(wait_for_completion=True)

Checking job status

job.done

Checking if job is cancelled

job.cancelled

Getting job results

job.get_result()

Checking job metrics

job.get_metrics()

Downloading retrieved data

To download retrieved data, use the RetrieveResult returned by feature_set.retrieve() and call its download() (or download_async()) method. See the Retrieve API for details.

data_path = fs.retrieve().download()

Waiting for a job result

You can block until a job completes and obtain its result using wait_for_result(poll_interval=2.0, timeout=None). Job status is available through the job_status and error_message properties.

result = job.wait_for_result(poll_interval=2.0, timeout=None)
job.job_status
job.error_message

Job metadata

Field NameUser ModifiableValues
idNo-
jobTypeNoIngest, Retrieve, BatchRetrieve, ExtractSchema, MaterializationOnline, ComputeStatistics, Backfill, OptimizeStorage, ComputeRecommendationClassifiers, Revert
doneNotrue, false
cancelledNotrue, false
childJobIdsNoChild job ids
parentNoResource name of the owning workspace, or empty for jobs created before workspace scoping
note

The done parameter indicates that the job has completed its execution and the results are available.

Permissions

Managing a job requires the owner or editor role, held either on the workspace that contains the feature set or on the feature set itself. This applies to:

  • Cancelling a job
  • Retrieving a job and listing the jobs of a feature set
  • Scheduling storage optimization

Starting an ingestion requires editor permission on the feature set. See Permissions for the full role model.

note

workspace.jobs.list() and client.jobs.list() are not gated by these roles, because they only ever return jobs that you started yourself.


Feedback