Batch job completion messages

44 views
Skip to first unread message

roliver

unread,
Dec 3, 2022, 2:43:51 PM12/3/22
to Google Ads API and AdWords API Forum
Hello,

I am successfully submitting mutate operations to the batch service api for Geo location targeting. I run batch, and poll the batch until it is completed then list the results of each job in the batch.  below are the responses I am getting.  My questions are:

  • Why is status always 'N/A'?  is that failure, successful completion or something else?

Results from the jobs in the batch

         Batch job #0 has a status 'N/A' and response of type 'campaign_criterion_result'.
         Batch job #1 has a status 'N/A' and response of type 'campaign_criterion_result'.
         Batch job #2 has a status 'N/A' and response of type 'campaign_criterion_result'.
         Batch job #3 has a status 'N/A' and response of type 'campaign_criterion_result'.
         Batch job #4 has a status 'N/A' and response of type 'campaign_criterion_result'.
         Batch job #5 has a status 'N/A' and response of type 'campaign_criterion_result'.
         Batch job #6 has a status 'N/A' and response of type 'campaign_criterion_result'.
         Batch job #7 has a status 'N/A' and response of type 'campaign_criterion_result'.
         Batch job #8 has a status 'N/A' and response of type 'campaign_criterion_result'.
         Batch job #9 has a status 'N/A' and response of type 'campaign_criterion_result'.
         Batch job #10 has a status 'N/A' and response of type 'campaign_criterion_result'.


Thanks for your help

Google Ads API Forum Advisor

unread,
Dec 4, 2022, 8:19:02 PM12/4/22
to roli...@gmail.com, adwor...@googlegroups.com
Hi Roliver,

Thank you for reaching out to us.

For our team to further investigate and validate if the request is done correctly, could you please provide us with the complete API logs (request and response with request-id) generated on your end? Note that this can be requested or provided to the developer handling the Google Ads API transactions when logging of the API requests has been enabled. You may check here and click your client library for the specific guideline to enable it.

For REST interface requests, you can enable logging via the curl command by using the -i flag. This will cause the tool to include the HTTP response headers in the output.

You may then send the requested information via the Reply privately to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.

Best regards,
Google Logo
Heidi
Google Ads API Team
 


ref:_00D1U1174p._5004Q2giLdB:ref

roliver

unread,
Dec 15, 2022, 8:24:08 AM12/15/22
to Google Ads API and AdWords API Forum
Hi Heidi,

I am using the PHP client library.  I have enabled logging in the google_ads_php.ini and set the logLevel to DEBUG.  However, no logs are being generated  According to the docs in php sdk that is how logging the request, response etc should be handled.  Is there some other setting I should be updating?  

Google Ads API Forum Advisor

unread,
Dec 15, 2022, 9:55:33 AM12/15/22
to roli...@gmail.com, adwor...@googlegroups.com
Hi,

As per this guide, and based on the message "Batch job #0 has a status 'N/A' and response of type 'campaign_criterion_result'." you received, you do not appear to be acquiring the contents of the status field.

That said, could you also share how you are listing the results and is it similar to this PHP implementation?

Best regards,

Google Logo
Peter Laurence
Google Ads API Team
 


ref:_00D1U1174p._5004Q2giLdB:ref

Rodney Oliver

unread,
Dec 16, 2022, 7:39:18 AM12/16/22
to Google Ads API Forum Advisor, adwor...@googlegroups.com
Hello,

I am getting the status from the batch job result.  However it seems to blank.  My implementation was taken directly from the AddCompleteCampaignsUsingBatchJob.php example

See snippet below.

// Gets all the results from running batch job and print their information.
        $batchJobResults = $this->googleAdsBatchServiceClient->listBatchJobResults(
            $batchJobResourceName,
            ['pageSize' => self::PAGE_SIZE]
        );
        foreach ($batchJobResults->iterateAllElements() as $batchJobResult) {
            /** @var BatchJobResult $batchJobResult */
            printf(
                "\t [%s] Batch job #%d has a status '%s' and response of type '%s'.%s",
                date('Y-m-d H:i:s'), $batchJobResult->getOperationIndex(),
                $batchJobResult->getStatus()
                    ? $batchJobResult->getStatus()->getMessage() : 'N/A',
                $batchJobResult->getMutateOperationResponse()
                    ? $batchJobResult->getMutateOperationResponse()->getResponse()
                    : 'N/A',
                PHP_EOL
            );
        }
Reply all
Reply to author
Forward
0 new messages