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

**URL:** https://matillioncommunity.discourse.group/t/segmenting-data-at-city-in-matillion-google-ads-query-component-is-not-working/1743
**Category:** Matillion ETL
**Created:** [May 5, 2022, 5:10am UTC](https://matillioncommunity.discourse.group/t/segmenting-data-at-city-in-matillion-google-ads-query-component-is-not-working/1743 "2022-05-05T05:10:20Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![RK160269](https://avatars.discourse-cdn.com/v4/letter/r/3bc359/32.png) [@RK160269](https://matillioncommunity.discourse.group/u/RK160269)
#### Post date: [May 5, 2022, 5:10am UTC](https://matillioncommunity.discourse.group/t/segmenting-data-at-city-in-matillion-google-ads-query-component-is-not-working/1743/1 "2022-05-05T05:10:20Z")

</div>

Hi All,

Currently&nbsp;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&nbsp;

"CampaignName",&nbsp;

"GeoTargetCity",&nbsp;

"GeoTargetCountry",&nbsp;

"Clicks",&nbsp;

"AverageCost"

FROM "Campaign"

WHERE&nbsp;

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

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

&nbsp;

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.

&nbsp;

&nbsp;

Can someone please help me solving the issue.

---

<div class="post-metadata">

### Author: ![yulong.guan](https://avatars.discourse-cdn.com/v4/letter/y/b38774/32.png) [@yulong.guan](https://matillioncommunity.discourse.group/u/yulong.guan)
#### Post date: [June 21, 2022, 8:03am UTC](https://matillioncommunity.discourse.group/t/segmenting-data-at-city-in-matillion-google-ads-query-component-is-not-working/1743/2 "2022-06-21T08:03:12Z")

</div>

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

---

<div class="post-metadata">

### Author: ![prerna.midha-cw](https://avatars.discourse-cdn.com/v4/letter/p/ea666f/32.png) [@prerna.midha-cw](https://matillioncommunity.discourse.group/u/prerna.midha-cw)
#### Post date: [August 21, 2023, 9:04am UTC](https://matillioncommunity.discourse.group/t/segmenting-data-at-city-in-matillion-google-ads-query-component-is-not-working/1743/3 "2023-08-21T09:04:27Z")

</div>

Hi,

&nbsp;

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.

&nbsp;

Hope this helps!

&nbsp;

Thanks
