Update the Data

After you upload data into a dataset, update it by adding, upserting, or removing data.

To update data, set the Action field to Process and the Operation field to Append, Upsert, or Delete.

This example sets the Action and Operation fields to append data to the InsightsExternalData object. To enable faster uploads, use the Mode field with a value of Incremental.

1SObject sobj = new SObject();
2sobj.setType("InsightsExternalData");
3sobj.setField("InsightsExternalDataId", parentID);
4sobj.setField("Action","Process");
5sobj.setField("Operation","Append");
6sobj.setField("Mode","Incremental");
7
8SaveResult[] results = partnerConnection.update(new SObject[] { sobj });
9
10for(SaveResult sv:results)
11  if(sv.isSuccess())
12    parentID = sv.getId();

If Mode isn’t specified or is set to None, the append is a bulk upload that processes data slower.