none
How much time does bulk upload takes? RRS feed

  • Question

  • I'm running a bulk upload script to update a campaign. The csv has only 3 columns (Type, Status, Id) and only 1 campaign with Status "Paused". And even a simple file is not being updated. I'm using the php sample to run it. So, how much does it take to be imported?

    Tuesday, January 5, 2016 10:33 AM

All replies

  • can't estimate with your provided information
    Tuesday, January 5, 2016 10:36 AM
  • Are you using this sample? Did you download the result file, and were there any errors? If there were no errors in the result file, then the update should have already taken effect.
    Tuesday, January 5, 2016 8:46 PM
    Owner
  • Yes, this is the example I'm using. But on this part of the code, $uploadSuccess returns nothing and it pass to the else condition:

    if ($uploadSuccess)
        {
            // GetUploadResultFileUrl helper method calls the corresponding Bing Ads service operation
            //to get the upload result file Url.
            $uploadResultFileUrl = GetUploadResultFileUrl($proxy, $uploadRequestId);
            DownloadFile($uploadResultFileUrl, $UploadResultFilePath);
            printf("The upload result file was written to %s.\n", $UploadResultFilePath);
            echo("UPLAOD SUCCESS");
        }
        else // Pending
        {
            echo("erro \n");
            printf("The request is taking longer than expected.\n" +
            "Save the upload ID (%s) and try again later.", $uploadRequestId);

            var_dump("requestid ".$uploadRequestId);
            print $proxy->GetWsdl() . "\n";
            print $proxy->GetService()->__getLastRequest()."\n"."\n"."\n"."\n";
            print $proxy->GetService()->__getLastResponse()."\n";
            return;
        }

    This is the response that I get:

    <?xml version="1.0" encoding="UTF-8"?>
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
       <s:Header>
          <h:TrackingId xmlns:h="https://bingads.microsoft.com/CampaignManagement/v10">57a588f0-79be-4de3-b979-a0fb9f526e3a</h:TrackingId>
       </s:Header>
       <s:Body>
          <GetBulkUploadStatusResponse xmlns="https://bingads.microsoft.com/CampaignManagement/v10">
             <Errors xmlns:i="http://www.w3.org/2001/XMLSchema-instance" i:nil="true" />
             <ForwardCompatibilityMap xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" />
             <PercentComplete>0</PercentComplete>
             <RequestStatus>PendingFileUpload</RequestStatus>
             <ResultFileUrl xmlns:i="http://www.w3.org/2001/XMLSchema-instance" i:nil="true" />
          </GetBulkUploadStatusResponse>
       </s:Body>
    </s:Envelope>

    Wednesday, January 6, 2016 2:34 AM
  • Which version of PHP are you using? You might need to modify the sample. Please see the proposed answer here:
    https://social.msdn.microsoft.com/Forums/en-US/7db53811-dfcf-49c1-b2dc-27bf9a76035d/bulk-upload-never-completes-pendingfileupload-and-percentcomplete0-forever?forum=BingAds

    I hope this helps!

    Wednesday, January 6, 2016 4:29 AM
    Owner
  • I'm using PHP 5.5.27. Thanks for the help, but the proposed answer is already implemented in my sample file (it cme this way, I did nothing) and it still doesn't work. This my upload file function:

    function UploadFile($UserName, $Password, $DeveloperToken, $CustomerId, $CustomerAccountId,
                        $uploadUrl, $filePath)
    {
        date_default_timezone_set("UTC");
        $ch = curl_init($uploadUrl);

        curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
        curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
                    
        curl_setopt($ch, CURLOPT_HTTPHEADER, array(
                                    "UserName: $UserName",
                                    "Password: $Password",
                                    "DeveloperToken: $DeveloperToken",
                                    "CustomerId: $CustomerId",
                                    "CustomerAccountId: $CustomerAccountId"
                                    ));

        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_POST, 1);
        
        // PHP 5.5+
        $file = curl_file_create($filePath, "application/zip", "payload.zip");
        curl_setopt($ch, CURLOPT_POSTFIELDS, array("payload" => $file));

        $result = curl_exec($ch);
                    
        if (curl_errno($ch))
        {
            print "Error: " . curl_error($ch) . "\n";
        }
        else
        {
            print $result . "\n";
        }
                 
        curl_close($ch);
    }

    Wednesday, January 6, 2016 10:49 AM
  • Do you have any additional information that would help debug the issue? For example, what is the value of $result?

    Thursday, January 7, 2016 1:29 AM
    Owner