• Mandeep Singh 146
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies

I am trying to pull contentVersion out of one org and push it into another cloud based file storage system and it is providing a lot of challenge given that I am unable to find a way to export the VersionData field for large files.

Has anyone found a way to do this?  Here is what I have tried (and failed):
Batch Apex - failed whenever a file larger than the heap space (12MB for batch) was queried
Bulk API using Java - you are not even allowed to query the VersionData field... wish I knew this before I wrote a whole program to retrieve it...

I am at a loss as to how to export the data in a way that I can rebuild it and upload to another cloud based system.  

 

any help is greatly appreciated as I am going mad :(

  • June 22, 2017
  • Like
  • 0
Hi,  I have been spending a lot of time trying to export ContentVersion records OUT of salesforce.  I did not realize this would be such a challenge.

I was doing this in batch apex and it worked but quickly ran out of heap space as there are files larger than 12MB (largest file is 500MB).

I then went to the Java Bulk API as I was made aware that the same heap space limitations did not exist however for files that are large (not sure what the cut off is as of yet) I seem to be getting a reply of: InternalServerError : Failed to write query result".

Does anyone know how to get around this, or in general how to export (programmatically) contentVersion data as I am looking to pull it out of Salesforce and push it into another cloud based system.

Any help would be greatly appreciated as I have been at this for quite some time :(
  • June 22, 2017
  • Like
  • 0