Manage the Upload

After you’ve created a header and uploaded the data parts by using the InsightsExternalData and InsightsExternalDataPart objects, update the Action field on the header object to Process to start processing the data.

The following example sets the Action field and updates the row in the InsightsExternalData object.

SObject sobj = new SObject();
sobj.setType("InsightsExternalData"); 
sobj.setField("Action","Process");
sobj.setId(parentID); // This is the rowID from the previous example.
SaveResult[] results = partnerConnection.update(new SObject[] { sobj });
 
for(SaveResult sv:results)
    if(sv.isSuccess())
        rowId = sv.getId();

When the Action field is set to Process, a dataflow job is created and marked active. You can monitor the Status field of the header object to determine when the file upload is completed. After the Action field is updated to request processing, no user edits are allowed on the objects.