jsforce icon indicating copy to clipboard operation
jsforce copied to clipboard

Upload data to Salesforce wave analytics.

Open raul26 opened this issue 9 years ago • 2 comments

Hello, I', trying to find a way to upload data to wave analytics with nodejs. Right now I have csv files with the information that I need upload, but could not find any way to do it. Is this library able to upload data to wave analytics? or someone can point me to the right direction.

Thank you.

raul26 avatar Sep 27 '17 15:09 raul26

I also would really appreciate any insight into doing this, thanks!

gabriel403 avatar Oct 17 '17 16:10 gabriel403

I find a solution here and I'm implementing it, but the person that posted the example tells you that you have to convert the file into base64 encode format.

I did a test to upload small amount of data (so I do not have to split the file) and parse it to base64:

MetadataJson: Buffer.from(JSON.stringify(csv)).toString('base64')

But I'm getting the following error:

[{"message":"Json Deserialization failed on token 'null' and has left off in the middle of parsing a row. Will go to end of row to begin parsing the next row","errorCode":"INVALID_FIELD"}]

I found that could be caused by the convertion to base64, so I'm guessing the way I'm doing it is not the correct.

Anyone has some experience uploading data to wave analytics? And other question, if the file is too big a good practice is split the file in chunks, so how is the best approach to create chunks of 10mb each?

raul26 avatar Oct 23 '17 21:10 raul26