Update destinations
- async AsyncCogniteClient.hosted_extractors.destinations.update(
- items: DestinationWrite | DestinationUpdate | Sequence[DestinationWrite | DestinationUpdate],
- mode: Literal['replace_ignore_null', 'patch', 'replace'] = 'replace_ignore_null',
Update one or more destinations.
- Parameters:
items (DestinationWrite | DestinationUpdate | Sequence[DestinationWrite | DestinationUpdate]) – Destination(s) to update.
mode (Literal['replace_ignore_null', 'patch', 'replace']) – How to update data when a non-update object is given (DestinationWrite). If you use ‘replace_ignore_null’, only the fields you have set will be used to replace existing (default). Using ‘replace’ will additionally clear all the fields that are not specified by you. Last option, ‘patch’, will update only the fields you have set and for container-like fields such as metadata or labels, add the values to the existing. For more details, see Update and Upsert Mode Parameter.
- Returns:
Updated destination(s)
- Return type:
Destination | DestinationList
Examples
Update destination:
>>> from cognite.client import CogniteClient >>> from cognite.client.data_classes.hosted_extractors import DestinationUpdate >>> client = CogniteClient() >>> # async_client = AsyncCogniteClient() # another option >>> destination = DestinationUpdate("my_dest").target_data_set_id.set(123) >>> res = client.hosted_extractors.destinations.update(destination)