Segmenting data at city in Matillion Google Ads query component is not working

Hi All,

Currently I am using Matillion version 1.62.

I am using Matillion "Google Ads Query" component to source data from data source "Campaign". My SQL query looks like:

SELECT 

"CampaignName", 

"GeoTargetCity", 

"GeoTargetCountry", 

"Clicks", 

"AverageCost"

FROM "Campaign"

WHERE 

( "Date" = '2022-05-02' )

So basically I am trying to get my clicks count at city, country and campaign level.

 

When running the component I am getting error as:

[PROHIBITED_SEGMENT_IN_SELECT_OR_WHERE_CLAUSE] [400] Request contains an invalid argument. Cannot select or filter on the following segments: 'segments.geo_target_city'(could not support requested resources: 'CAMPAIGN'), 'segments.geo_target_country'(could not support requested resources: 'CAMPAIGN'), since segment is incompatible with the resource in the FROM clause or other selected segmenting resources.

 

 

Can someone please help me solving the issue.

have you managed to solve this issue? i got the same error too

Hi,

 

Per my understanding, you should include filter for PERIOD in the where clause along with specifying the Date column.

Second, the columns GeoTargetCity and GeoTargetCountry does not belong to CAMPAIGN, you will need to join another table (possibly, GeoTargetConstant/ GeographicView/ CampaignCriterion) and pull these values.

 

Hope this helps!

 

Thanks