Invalid enum value cannot be included in WHERE clause

481 views
Skip to first unread message

san...@knorex.com

unread,
Dec 20, 2021, 11:05:52 PM12/20/21
to AdWords API and Google Ads API Forum
Hi,
1) I tried a query but it said BAD_ENUM_CONSTANT
My query: 
SELECT conversion_goal_campaign_config.custom_conversion_goal,
conversion_goal_campaign_config.goal_config_level,
custom_conversion_goal.status,
custom_conversion_goal.conversion_actions
FROM conversion_goal_campaign_config
WHERE conversion_goal_campaign_config.goal_config_level = 'GoalConfigLevel.CAMPAIGN'

I tried: conversion_goal_campaign_config.goal_config_level = 3 or conversion_goal_campaign_config.goal_config_level = 'CAMPAIGN". No success too.


2) How to dismiss data fields in response?
Ex: in my query SELECT campaign.id
Response gives full detail of campaign. I just want campaign id only.
"campaign": {
"bitField0": 3,
"campaignBiddingStrategyCase": 0,
"resourceName": "customers/9112513441/campaigns/11344822329",
"id": 11344822329,
"name": "Test 46",
"status": 0,
"servingStatus": 0,
"adServingOptimizationStatus": 0,
"advertisingChannelType": 0,
"advertisingChannelSubType": 0,
"trackingUrlTemplate": "",
"urlCustomParameters": [],
"labels": [],
"experimentType": 0,
"baseCampaign": "",
"campaignBudget": "",
"biddingStrategyType": 0,
"accessibleBiddingStrategy": "",
"startDate": "",
"endDate": "",
"finalUrlSuffix": "",
"frequencyCaps": [],
"videoBrandSafetySuitability": 0,
"paymentMode": 0,
"optimizationScore": 0.0,
"excludedParentAssetFieldTypes": [],
"excludedParentAssetFieldTypesconverter": {},
"excludedParentAssetFieldTypesMemoizedSerializedSize": 0,
"urlExpansionOptOut": false
}

Google Ads API Forum Advisor

unread,
Dec 21, 2021, 10:25:55 AM12/21/21
to san...@knorex.com, adwor...@googlegroups.com
Hi there,

WHERE conversion_goal_campaign_config.goal_config_level = 'CAMPAIGN' is the correct way, I just tried our GAQL query builder.

To address your errors, could you privately send us a request and response log of API communication that returns this error?  The request and response appears similar to the JSON Mappings in our REST documentation. Our client libraries have loggers with logging instructions, to see these instructions you can click on the client library you use in the sidebar of our client library guide and click on "Logging". Setting the logger to 'DEBUG' will get the desired log.

Regards,

Google Logo
Aryeh Baker
Google Ads API Team
 


ref:_00D1U1174p._5004Q2TODa9:ref
Reply all
Reply to author
Forward
0 new messages