Does pyax do batching ?

Asked by Ray C Horn

Batching is where a bunch of records are uploaded to SalesForce at the same time (limit 200) and acted upon as a batch.

SalesForce provides the ability to batch but does pyax support batching at this time ?

If not supported by 0.9.7 are there any plans to support batching in the future ?

Question information

Language:
English Edit question
Status:
Solved
For:
pyax Edit question
Assignee:
No assignee Edit question
Solved by:
Kevin Shuk
Solved:
Last query:
Last reply:
Revision history for this message
Best Kevin Shuk (surf) said :
#1

Yes, pyax definitely does batching, and in fact has a batch object for this purpose.

Your best bet is to get the tarball release and unpack it so you can have a look inside. Within the top dir of the unpacked tarball, navigate to pyax/tests and look at demo.py. This has two main demos, single-object and batch.

In a nutshell, you can create a batch of an object by providing a list of dictionaries to the create call.

Queries and retrieves automatically return batches.

Batches can be updated, upserted and deleted, affecting all objects in the batch.

Batches are ordered dictionaries, keyed by the sobject id, but maintain the order the objects were added in (important, say, if your query specifies an ordering).

Revision history for this message
Ray C Horn (mrpython94596) said :
#2

Thanks Kevin Shuk, that solved my question.

Revision history for this message
Ray C Horn (mrpython94596) said :
#3

I have confirmed that pyax 0.9.6 does indeed do automatic batching when creating objects.

SalesForce allows 200 records at a time to be batched and pyax handles this like a charm.