RE: Error when batch creating adgroup with 17,200+ product groups

2019-03-07 Thread richard . scorer
Hi Josh,

Thanks very much for your response, much appreciated...

I will apply your suggested fix first thing in the morning!

Cheers,
Richard

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads 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/afa89301-bd26-4e03-9e08-4cb8faaf3f03%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Error when batch creating adgroup with 17,200+ product groups

2019-03-07 Thread googleadsapi-forumadvisor via AdWords API and Google Ads API Forum


Hi Richard,

The good news is that it looks like you're constructing your operations
correctly. The bad news is that due to the complexity of *ProductPartition*  
mutates,

there are edge cases where *BatchJobService* will run into the error you
mentioned when it retries a subset of operations that mutate a product
partition tree.

As a workaround, you could try the following when you have extremely large
product partition trees:

   1. Submit one batch job that adds a subset of the product partitions,
   making sure it includes the "other" node for every subdivision.
   2. Once the first job completes, submit another batch job that only adds
   more UNIT nodes to SUBDIVISIONS where you already added the "other" node  
in

   the first job. Since this second job isn't changing the structure of the
   tree or modifying/adding the "other" node, it shouldn't encounter the  
error

   below.

For example, if you want a two level tree like this:

   - Root
  - ProductOfferId 1
  - ProductOfferId 2
  - ...
  - ProductOfferId 17,258
  - ProductOfferId null (the "other" node)

Then batch job 1 could submit:

   - Root
  - ProductOfferId 1
  - ProductOfferId 2
  - ...
  - ProductOfferId *7,000 <-- You could make this much smaller if
  that's easier. The key thing is to get the structure of the tree in  
place,

  with an "other" node under every subdivision.*
  - ProductOfferId null (the "other" node)

And batch job 2 could just include:

   - ProductOfferId 7,001
  - ProductOfferId 7,002
  - ...
  - ProductOfferId 17,258

The batch job team is looking into fixing this, but I don't have a timeline
at this point.

Thanks,
Josh, AdWords API Team

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

On 03/06/19 04:37:25 richard.sco...@redbrain.com wrote:

Hello Sai,

I believe this to be the OTHER case:

 AdGroupCriterionOperation{operand=NegativeAdGroupCriterion{adGroupId=-2,
criterion=ProductPartition{caseValue=ProductOfferId{}, id=-17253,
parentCriterionId=-1, partitionType=UNIT}}, operator=ADD},

We don't want to bid on the other items in this group, so we are adding it
as an excluded unit.

This same code has worked when the number of product groups is less than
17,000. I have not worked out the point at which it starts failing. Perhaps
I'm missing something. I've read that page numerous times, and still don't
see where the problem lies...

I use the ProductPartitionTree code as found in googleads-java-lib - i also
tried adding the excluded unit as a sub division, and ended up with the
same error.


val rootNode =
productPartitionTree.root.removeAllChildren().asSubdivision()
for (product in products) {

rootNode.addChild(createProductItemAttribute(product)).asBiddableUnit().bid
= bidAmount
}

rootNode.addChild(createProductItemAttribute(null)).asExcludedUnit()
...

private fun createProductItemAttribute(offer: String?):
ProductDimension {
return ProductDimensions.createOfferId(offer)
}


Thanks,
Richard



On Tuesday, 5 March 2019 23:08:11 UTC, googleadsapi-forumadvisor wrote:

Hello Richard,

While creating the product partitions, remember that each subdivision must
contain an "empty" case value of the correct type, representing "all other
values". Basically, you have to create another empty subdivision that
represents all other categories to complete the product partition table,
the partition table should be always completed. When you miss the others
subdivision then it is likely to see the PRODUCT_PARTITION_SUBDIVISION_

REQUIRES_OTHERS_CASE
  
error.

You could refer this guide
  
for

more information. Please let me know if you have any further questions.

Regards,
Sai teja, AdWords API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a
short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey


Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api

Re: Error when batch creating adgroup with 17,200+ product groups

2019-03-06 Thread richard . scorer
Hello Sai,

I believe this to be the OTHER case:

 AdGroupCriterionOperation{operand=NegativeAdGroupCriterion{adGroupId=-2, 
criterion=ProductPartition{caseValue=ProductOfferId{}, id=-17253, 
parentCriterionId=-1, partitionType=UNIT}}, operator=ADD},

We don't want to bid on the other items in this group, so we are adding it 
as an excluded unit. 

This same code has worked when the number of product groups is less than 
17,000. I have not worked out the point at which it starts failing. Perhaps 
I'm missing something. I've read that page numerous times, and still don't 
see where the problem lies...

I use the ProductPartitionTree code as found in googleads-java-lib - i also 
tried adding the excluded unit as a sub division, and ended up with the 
same error.


val rootNode = 
productPartitionTree.root.removeAllChildren().asSubdivision()
for (product in products) {

rootNode.addChild(createProductItemAttribute(product)).asBiddableUnit().bid 
= bidAmount
}

rootNode.addChild(createProductItemAttribute(null)).asExcludedUnit()
...

private fun createProductItemAttribute(offer: String?): 
ProductDimension {
return ProductDimensions.createOfferId(offer)
}


Thanks,
Richard



On Tuesday, 5 March 2019 23:08:11 UTC, googleadsapi-forumadvisor wrote:
>
> Hello Richard,
>
> While creating the product partitions, remember that each subdivision must 
> contain an "empty" case value of the correct type, representing "all other 
> values". Basically, you have to create another empty subdivision that 
> represents all other categories to complete the product partition table, 
> the partition table should be always completed. When you miss the others 
> subdivision then it is likely to see the PRODUCT_PARTITION_SUBDIVISION_ 
> 
> REQUIRES_OTHERS_CASE 
> 
>  error. 
> You could refer this guide 
>  
> for 
> more information. Please let me know if you have any further questions.
>
> Regards,
> Sai teja, AdWords API Team
>
>
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> Also find us on our blog and discussion group:
> http://googleadsdeveloper.blogspot.com/search/label/adwords_api
> https://developers.google.com/adwords/api/community/
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
>
> Was your question answered? Please rate your experience with us by taking 
> a short survey.
> If not -- reply to this email and tell us what else we can do to help.
>
> Take Survey 
> 
>
> Also find us on our blog and discussion group:
> http://googleadsdeveloper.blogspot.com/search/label/adwords_api
> https://developers.google.com/adwords/api/community/
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads 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/610ceeab-d0b3-44de-84f5-6127b0b036a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Error when batch creating adgroup with 17,200+ product groups

2019-03-05 Thread googleadsapi-forumadvisor via AdWords API and Google Ads API Forum


Hello Richard,

While creating the product partitions, remember that each subdivision must
contain an "empty" case value of the correct type, representing "all other
values". Basically, you have to create another empty subdivision that
represents all other categories to complete the product partition table,
the partition table should be always completed. When you miss the others
subdivision then it is likely to see the PRODUCT_PARTITION_SUBDIVISION_

REQUIRES_OTHERS_CASE
  
error.

You could refer this guide
  
for

more information. Please let me know if you have any further questions.

Regards,
Sai teja, AdWords API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads 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/186sojo0oc115o002g10s8y6smjic9h68o30c1g68qjechn%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Error when batch creating adgroup with 17,200+ product groups

2019-03-05 Thread richard . scorer
Hi, running into a strange problem with a batch processing job I ran today. 
It's telling me that

errString=AdGroupCriterionError.PRODUCT_PARTITION_SUBDIVISION_REQUIRES_OTHERS_CASE

However, this same code path has worked on (many) previous batch jobs. The 
possible difference is that this one is trying to create an ad group with 
17,000+ product groups. I wonder if I am hitting a limit somewhere? We're 
supposed to be able to have 20,000 product groups, so I'm a bit baffled :)

The ads account ID in this instance is 773-204-9788 and the batch job ID is 
1137879402. I have a list of the operations if that would help (the text 
file is 10Mb long though :) )

Here's a small sample:

 AdGroupCriterionOperation{operand=BiddableAdGroupCriterion{adGroupId=-2, 
criterion=ProductPartition{id=-1, partitionType=SUBDIVISION}}, 
operator=ADD},
 AdGroupCriterionOperation{operand=BiddableAdGroupCriterion{adGroupId=-2, 
biddingStrategyConfiguration=BiddingStrategyConfiguration{bids=[CpcBid{bid=Money{microAmount=1},
 
cpcBidSource=CRITERION}]}, 
criterion=ProductPartition{caseValue=ProductOfferId{value=2c8b-1b65-49d2-9536-e8899d313190},
 
id=-2, parentCriterionId=-1, partitionType=UNIT}, 
urlCustomParameters=CustomParameters{doReplace=true, parameters=[]}}, 
operator=ADD},
...
 AdGroupCriterionOperation{operand=NegativeAdGroupCriterion{adGroupId=-2, 
criterion=ProductPartition{caseValue=ProductOfferId{}, id=-17253, 
parentCriterionId=-1, partitionType=UNIT}}, operator=ADD},



Any ideas why this is failing? 

Thanks :)

Richard

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads 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/0516ffd4-5067-4f17-8499-312f53e5a7e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.