List jobs
- async AsyncCogniteClient.hosted_extractors.jobs.list(
- limit: int | None = 25,
-
- Parameters:
limit (int | None) – Maximum number of jobs to return. Defaults to 25. Set to -1, float(“inf”) or None to return all items.
- Returns:
List of requested jobs
- Return type:
JobList
Examples
List jobs:
>>> from cognite.client import CogniteClient, AsyncCogniteClient >>> client = CogniteClient() >>> # async_client = AsyncCogniteClient() # another option >>> job_list = client.hosted_extractors.jobs.list(limit=5)
Iterate over jobs, one-by-one:
>>> for job in client.hosted_extractors.jobs(): ... job # do something with the job
Iterate over chunks of jobs to reduce memory load:
>>> for job_list in client.hosted_extractors.jobs(chunk_size=25): ... job_list # do something with the jobs