Hi, I am trying to pull unique Account,Campaign Name, & Campaign ID's using 
AWQL using PHP.  Here's the reporting part of my code:

    $reportQuery = 'SELECT AccountDescriptiveName,CampaignName,CampaignId FROM 
ADGROUP_PERFORMANCE_REPORT';
    $reportDownloader = new ReportDownloader($session);
    $reportSettingsOverride = (new ReportSettingsBuilder())
        ->includeZeroImpressions(false)
        ->skipReportHeader(TRUE)
                ->skipColumnHeader(FALSE)
                ->skipReportSummary(TRUE)
                ->SkipReportHeader(TRUE)
                ->build();
    $reportDownloadResult = 
$reportDownloader->downloadReportWithAwql($reportQuery, DownloadFormat::CSV, 
$reportSettingsOverride);
    $a =  $reportDownloadResult->getAsString();



And this is the output:


[2017-09-06 08:11:06] AW_REPORT_DOWNLOADER.INFO: 
clientCustomerId=509-496-9641 unknown (AwApi-PHP, googleads-php-lib/29.0.0, 
PHP/7.1.2, GuzzleHttp/6.2.1, curl/7.51.0) "POST 
/api/adwords/reportdownload/v201708 HTTP/1.1" Status: 200
Account,Campaign,Campaign ID
Account #1,Campaign #2,921452568
Account #1,Campaign #2,921452568
Account #1,Campaign #1,912412908
Account #1,Campaign #1,912412908 

As you can see the result is duplicated.  How do I only get back distinct 
rows?

Thank you very much for the help.

Regards
Tim

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/4e311e39-25ed-4e18-a0ce-fe8d87738f14%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • AWQL result has... Tim Johnson
    • Re: AWQL r... 'Shwetha Vastrad (AdWords API Team)' via AdWords API Forum

Reply via email to