2 messages in com.googlegroups.google-base-data-apiRe: batch update via API
FromSent OnAttachments
Chuender12 Sep 2007 08:39 
Jeff S14 Sep 2007 10:43 
Subject:Re: batch update via API
From:Jeff S (j.@google.com)
Date:09/14/2007 10:43:58 AM
List:com.googlegroups.google-base-data-api

Hi Chuender,

You can perform insert and update operations in batch requests, see the documentation here:

http://code.google.com/apis/gdata/batch.html

For both the insert and update operations, you include the full XML Atom entry for the item as you would normally, but you add the following XML elements:

<batch:operation type="insert"/> (or "update" to edit an existing item) <batch:id>1</batch:id>

I don't think that the number of items that you want to upload will present a problem, provided that you stick to the API operation limit:

http://code.google.com/support/bin/answer.py?answer=62881&topic=10184

There is also a limit to the size of each batch request, 1MB ( http://code.google.com/support/bin/answer.py?answer=70686&topic=10187 ) so you probably won't be able to insert all of your items in one batch request ;)

Happy coding,

Jeff

On Sep 12, 8:40 am, Chuender <chue@gmail.com> wrote:

The PHP sample recipes app makes use of the ATOM batch operation to delete all the recipes in an account. I have a need to upload north of 2 million records into Base, is there a defined schema for other operations such as update and insert?

What would be the best way to upload these records into Base? Any pointers would be greatly appreciated!

Thanks,

Chuender