Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

And if addOrUpdate does not do batches, can some API function handle updates in batches on their own or do we need to do it manually?

Answer

addOrUpdate adds/updates items one by one. There is no way in Groovy API to insert/upsert a batch of records, it is always one by one. If necessary, this can be worked around using boundcall & loaddata endpoint.Also note that the loaddata API does not respect table constraints from the configuration (such as PX keys, etc.), whereas Groovy API will enforce them. Business keys in PX are just a UI thing, whereas the integration API can load anything, even null for keys in PP tableslimit to the amount of rows you can add using api.addOrUpdate, so it is up to your consideration. FYI maximum amount of rows I was able to update via “Groovy and SQL Console“ tool without the request timing out was ~6 million.