Skip to main content

I’m trying to use Update extraction pipelines method to update my extraction pipelines created. Here are some issues i face:

1. I’m unable to update contacts for an extraction pipeline, it throws the below error:
code - 

contact_info = fExtractionPipelineContact(name="sangs", email="sm6@slb.com", role = "MAINTAINER", send_notification=True)]
to_update = ExtractionPipelineUpdate(external_id="<PIPELINE-EXT-ID-2>")
to_update.contacts.set(contact_info)
client.extraction_pipelines.update(to_update)

error - 

“CogniteAPIError: Unexpected field - items 0].update.contacts.seta0].send_notification - did you mean sendNotification? | code: 400 | X-Request-ID: 918d1113-6a5e-9d38-b850-61e3dc54c220 The API Failed to process some items. Successful (2xx): ] Unknown (5xx): ] Failed (4xx): <PIPELINE-EXT-ID-2>, ...]”


2. I’m unable to set the specified fields to None using sdk : description, source, schedule,documentation, name and dataset-id. Im able to set only metadata and raw-tables to None. Wondering why some are supported and some arent. is this the expected behaviour? below is the error i face when i make specified fields to None:
code- 

to_update = ExtractionPipelineUpdate(external_id="<PIPELINE-EXT-ID-2>")
to_update.documentation.set(None)
client.extraction_pipelines.update(to_update)

error - 
“CogniteAPIError: Unexpected field - itemsx0].update.documentation.setNull - did you mean set? | code: 400 | X-Request-ID: 40485149-0d37-9f02-bed5-7d9dc32192d3 The API Failed to process some items. Successful (2xx): s] Unknown (5xx): )] Failed (4xx): x<PIPELINE-EXT-ID-2>, ...]”

 

3. i see “notificationConfig” is not supported in sdk yet. When can we expect it’s support?

@Snehal Jagtap 


Hi @Sangavi M 

I was able to recreate the issue. I will check and get back to you with an update.

 

Thanks and regards,
Pasindu Perera


Hi @Sangavi M,

I have created a support ticket for this issue. The team will follow up and update you. 


@Sangavi M Please try upgrading to the latest Cognite Python SDK.  I understand there was a bug.

The following code snippet works for me with v7.22:
 

update = ExtractionPipelineUpdate(external_id="csv:oee:datapoints")
update.contacts.set(eExtractionPipelineContact("jason", "jason.dressel@cognite.com", "sa", False)])
update.description.set("")
res = client.extraction_pipelines.update(update)
res

-Jason


Hi Jason!

The update contacts part works now! Thank you. I’m still facing issue with updating documentation,source, etc fields to None 


@Sangavi M , I set to an empty string (“”)

-Jason


Hi @Jason Dressel !

setting to an empty string works for description,source and documentation but doesnt work for schedule:

CogniteAPIError: Request had constraint violation. Please fix the request and try again. iupdate.request.itemst0].update.schedule.set: Possible values: “On trigger”, “Continuous” or cron expression. If empty then null. ] | code: 400 | X-Request-ID: 351a260a-f369-9670-bbaa-d6ed3bafdb8c


Hi @Sangavi M,

Did you manage to resolve this issue? 


Reply