Théo Lapido
11/26/2025, 10:24 PMtap-googleads. I'm having trouble trying to use the custom query feature, I've added the required configs to the yml but the Stream is not being recognized.
- name: tap-googleads
variant: matatika
pip_url: git+<https://github.com/Matatika/tap-googleads>
config:
start_date: '2025-10-28'
custom_queries:
- name: gads_ads_performance_custom
query: 'SELECT ad_group_ad.ad.expanded_text_ad.headline_part1, ad_group_ad.ad.expanded_text_ad.headline_part2, ad_group_ad.ad.expanded_text_ad.headline_part3, a>
primary_keys: [ad_group_ad.ad.name, segments.date]
replication_key: segments.date
Does anybody use this feature or has had similar trouble before?Reuben (Matatika)
11/26/2025, 10:30 PMmeltano select tap-googleads --list --all
?Reuben (Matatika)
11/26/2025, 10:31 PMThéo Lapido
11/26/2025, 10:33 PMThéo Lapido
11/26/2025, 10:36 PMReuben (Matatika)
11/26/2025, 10:36 PMcustom_queries one more level so it is under config.Reuben (Matatika)
11/26/2025, 10:36 PMThéo Lapido
11/26/2025, 10:38 PMReuben (Matatika)
11/26/2025, 10:39 PMtap-googleads does automatic flattening to allow use of these. With your configuration, that means you have to reference nested properties with __ instead of ., i.e.
custom_queries:
- name: "ad_group_performance"
query: >
SELECT
customer.resource_name,
customer.id,
bidding_strategy.resource_name,
bidding_strategy.id,
ad_group.resource_name,
ad_group.labels,
ad_group.ad_rotation_mode,
ad_group.effective_target_cpa_micros,
segments.ad_network_type,
campaign.resource_name,
campaign.id,
segments.device,
ad_group.id,
ad_group.effective_target_cpa_source,
campaign.name,
ad_group.name,
customer.descriptive_name,
ad_group.effective_target_roas_source,
ad_group.status,
ad_group.cpc_bid_micros,
ad_group.effective_target_roas,
campaign.bidding_strategy_type,
bidding_strategy.name,
segments.date
FROM ad_group
add_date_filter_to_query: true
replication_key: "segments__date"
replication_method: "INCREMENTAL"
primary_keys: ["adGroup__id","segments__ad_network_type","segments__date","segments__device"]Théo Lapido
11/26/2025, 10:42 PMReuben (Matatika)
11/26/2025, 10:46 PMmeltano select tap-googleads --list --all
should help you figure out the available properties that you can use as the primary key(s)/replication key, since the tap works with names as returned by the API (sometimes camelCase, sometimes snake_case), rather than as specified in the query (always snake_case, as far as I am aware).Reuben (Matatika)
11/26/2025, 10:47 PM