Does BatchJob has PartialFailure param to set ?

21 views
Skip to first unread message

ewin zhou

unread,
Aug 2, 2021, 7:59:59 AM8/2/21
to AdWords API and Google Ads API Forum
When i use batch job, I want as a Transactional in one request or  same batchjobresource.
if one operation fail  ,all request fail.
i can find PartialFailure param in MutateGoogleAdsRequest, but how can i to set in batch job as AddBatchJobOperationsRequest?
thanks 

Google Ads API Forum Advisor

unread,
Aug 2, 2021, 11:49:03 AM8/2/21
to ewin...@gmail.com, adwor...@googlegroups.com
Hi Ewin,

Thank you for reaching out to us with your question. You can check this section out that talks about the param. If you want to set the whole job to fail if one fails, you can set the param as false and this will cause the whole job to fail then.

Regards,
Google Logo
William Pescherine
Google Ads API Team
 


ref:_00D1U1174p._5004Q2LULpl:ref

ewin zhou

unread,
Aug 3, 2021, 4:21:30 AM8/3/21
to AdWords API and Google Ads API Forum

this section is support to  MutateAdGroupsRequest,  which contains partial_failure param.
but i want to use in batchjobservice, i have not found partial_failure to set yet

Google Ads API Forum Advisor

unread,
Aug 3, 2021, 9:59:29 PM8/3/21
to ewin...@gmail.com, adwor...@googlegroups.com
Hi Ewin,

When using the BatchJobService, it should already handle the partial failures for you. You may then poll your job's status while running, or list all the jobs once it's done.

However, if your requirement requires you to fail the entire job in the event of even just a single failure then, as mentioned in this section :

"If there is a requirement to fail the entire job in the event of a single failure along the way, use GoogleAdsService.Mutate to apply multiple operations in a single request, with partial_failures set to false."

I hope this helps.

Best regards,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


ref:_00D1U1174p._5004Q2LULpl:ref
Reply all
Reply to author
Forward
0 new messages