Update the attributes of transformations, maximum 1000 per request.
Array of UpdateItemWithExternalId_TransformationUpdate (object) or UpdateItemWithId_TransformationUpdate (object) <= 1000 items |
Response with list of transformations.
The response for a failed request.
The response for a forbidden request.
The response for a conflict.
transformation = client.transformations.retrieve(id=1) transformation.query = "SELECT * FROM _cdf.assets" res = client.transformations.update(transformation) from cognite.client.data_classes import TransformationUpdate my_update = TransformationUpdate(id=1).query.set("SELECT * FROM _cdf.assets").is_public.set(False) res = client.transformations.update(my_update) from cognite.client.data_classes import NonceCredentials to_update = client.transformations.list(data_set_external_ids=["foo"]) new_session = client.iam.sessions.create() new_nonce = NonceCredentials( session_id=new_session.id, nonce=new_session.nonce, cdf_project_name=client.config.project ) for tr in to_update: tr.source_nonce = new_nonce tr.destination_nonce = new_nonce res = client.transformations.update(to_update)
{- "items": [
- {
- "id": 0,
- "name": "string",
- "query": "string",
- "destination": {
- "type": "assets"
}, - "conflictMode": "abort",
- "isPublic": true,
- "blocked": {
- "reason": "string",
- "createdTime": 0
}, - "createdTime": 0,
- "lastUpdatedTime": 0,
- "owner": "string",
- "ownerIsCurrentUser": true,
- "hasSourceOidcCredentials": true,
- "hasDestinationOidcCredentials": true,
- "sourceSession": {
- "clientId": "string",
- "sessionId": 0,
- "projectName": "string"
}, - "destinationSession": {
- "clientId": "string",
- "sessionId": 0,
- "projectName": "string"
}, - "lastFinishedJob": {
- "id": 0,
- "uuid": "string",
- "transformationId": 0,
- "transformationExternalId": "string",
- "sourceProject": "string",
- "destinationProject": "string",
- "destination": {
- "type": "assets"
}, - "conflictMode": "abort",
- "query": "string",
- "createdTime": 0,
- "startedTime": 0,
- "finishedTime": 0,
- "lastSeenTime": 0,
- "error": "string",
- "ignoreNullFields": true,
- "status": "Completed"
}, - "runningJob": {
- "id": 0,
- "uuid": "string",
- "transformationId": 0,
- "transformationExternalId": "string",
- "sourceProject": "string",
- "destinationProject": "string",
- "destination": {
- "type": "assets"
}, - "conflictMode": "abort",
- "query": "string",
- "createdTime": 0,
- "startedTime": 0,
- "finishedTime": 0,
- "lastSeenTime": 0,
- "error": "string",
- "ignoreNullFields": true,
- "status": "Completed"
}, - "schedule": {
- "id": 0,
- "externalId": "string",
- "createdTime": 0,
- "lastUpdatedTime": 0,
- "interval": "0 0 * * *",
- "isPaused": true
}, - "externalId": "string",
- "ignoreNullFields": true,
- "dataSetId": 0,
- "tags": [
- "string"
]
}
]
}