Update transformation schedules

async AsyncCogniteClient.transformations.schedules.update(
item: TransformationSchedule | TransformationScheduleWrite | TransformationScheduleUpdate | Sequence[TransformationSchedule | TransformationScheduleWrite | TransformationScheduleUpdate],
mode: Literal['replace_ignore_null', 'patch', 'replace'] = 'replace_ignore_null',
) TransformationSchedule | TransformationScheduleList

Update one or more transformation schedules.

Parameters:
Returns:

Updated transformation schedule(s)

Return type:

TransformationSchedule | TransformationScheduleList

Examples

Update a transformation schedule that you have fetched. This will perform a full update of the schedule:

>>> from cognite.client import CogniteClient, AsyncCogniteClient
>>> client = CogniteClient()
>>> # async_client = AsyncCogniteClient()  # another option
>>> transformation_schedule = client.transformations.schedules.retrieve(id=1)
>>> transformation_schedule.is_paused = True
>>> res = client.transformations.schedules.update(transformation_schedule)

Perform a partial update on a transformation schedule, updating the interval and unpausing it:

>>> from cognite.client.data_classes import TransformationScheduleUpdate
>>> my_update = (
...     TransformationScheduleUpdate(id=1).interval.set("0 * * * *").is_paused.set(False)
... )
>>> res = client.transformations.schedules.update(my_update)