Reputation: 424
I have a working flow to upload files from sharepoint to salesforce. It works fine.
Recently identified the issue that there is maximum batch limit is there at salesforce end i.e a single batch contain at most 10,000,000 characters. When a large file which contains more than 10,000,000 characters. It got failed to upload into salesforce and got below error.
Ia there any other way to upload more than 10,000,000 characters into salesforce in a single batch. I can not send half of the file in one batch and another half in another batch because sync up issue comes.
Code:
<enricher target="#[flowVars['jobInfo_upload']]" doc:name="Enricher jobId insert">
<sfdc:create-job config-ref="SFA_NOL_SHAREPOINT" type="ContentVersion" concurrencyMode="Parallel" contentType="XML" operation="insert" doc:name="Create Job"/>
</enricher>
<expression-component doc:name="Expression to save jobid"><![CDATA[sessionVars.jobInfo_upload = flowVars.jobInfo_upload.id]]></expression-component>
<dw:transform-message metadata:id="1dec8ccb-75ec-4be9-933e-06eb92354eba" doc:name="Transform Message">
<dw:set-payload><![CDATA[%dw 1.0
%output application/java
---
[{
Title: flowVars.filename,
PathOnClient: flowVars.path,
TagCsv: "Sharepoint Version: " ++ flowVars.MajorVersion ++ "." ++ flowVars.MinorVersion,
VersionData: payload,
FirstPublishLocationId: flowVars.FirstPublishLocationId
}]]]></dw:set-payload>
</dw:transform-message>
<sfdc:create-batch config-ref="SFA_NOL_SHAREPOINT" doc:name="Insert">
<sfdc:job-info ref="#[flowVars.jobInfo_upload]"/>
<sfdc:objects ref="#[payload]"/>
</sfdc:create-batch>
Error:
09:51:01.348 10/13/2017 Worker-0 [apl-sfa-sharepoint-interface].batch-upload-simpleBatchFlow.stage1.17 ERROR
********************************************************************************
Message : Failed to invoke createBatch. Message payload is of type: ArrayList
Type : org.mule.api.MessagingException
Code : MULE_ERROR-29999
JavaDoc : http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html
Payload : [{Title=Customer Presentation Deck_Template (October 2017).pptx, PathOnClient=/Users/dangnguyen/sharepoint/ Deck_Template.pptx, TagCsv=Sharepoint Version: 1.0, VersionData=UEsDBBQABgAIAAAAIQD9wUeU7QUAADV9AAATAAgCW0NvbnRlbnRfVHlwZXNdLnhtbCCiBAIooAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADMnU1v20YQhu8F+h8EXQuLH5IoKrCdQ...
********************************************************************************
Exception stack is:
1. ClientInputError : Failed to read request. Exceeded max size limit of 10000000 (com.sforce.async.AsyncApiException)
com.sforce.async.BulkConnection:180 (null)
2. ClientInputError : Failed to read request. Exceeded max size limit of 10000000 (org.mule.modules.salesforce.exception.SalesforceException)
Upvotes: 1
Views: 4995
Reputation: 49
There is a limit for bulk API itself.
https://www.salesforce.com/us/developer/docs/api_asynch/Content/asynch_api_concepts_limits.htm
Batches for data loads can consist of a single CSV or XML file that can be no larger than 10 MB.
A batch can contain a maximum of 10,000 records.
A batch can contain a maximum of 10,000,000 characters for all the data in a batch.
A field can contain a maximum of 32,000 characters.
A record can contain a maximum of 5,000 fields.
A record can contain a maximum of 400,000 characters for all its fields.
A batch must contain some content or an error occurs.
So you should divide the input file into files less than these limits.
Upvotes: 4