[resolved] Unable to load attachments via tSalesforceOutput in TOS
Hi
In Talend Open Studio for Data Integration 6.1.1 I once had a simple demo job which ~6 weeks ago loaded Base64 encoded strings happily to the Salesforce.com Attachment object. Since recently this is no longer possible (neither in 6.1.1 nor in 6.2.X). The setup is pretty simple: tFixedFlowInput --> tMap (nothing happens here) --> tSalesforceOutput. The type of the Body field is set to String (I am passing on a Base64 encoded string in here) but apparently, Salesforce.com expects Base64 as the type - which I cannot set in TOS. I have tried playing around with byte[] but to no avail. Again, until the Salesforce.com Summer '16 release this worked perfectly fine (with Body of type String).
I am getting the following error message:
Exception in component tSalesforceOutput_1
java.io.IOException:
Body: value not of required type: VGhpcyBpcyBhIHRlc3QgZmlsZQ==
at org.talend.components.salesforce.runtime.SalesforceWriter.handleReject(SalesforceWriter.java:417)
at org.talend.components.salesforce.runtime.SalesforceWriter.doInsert(SalesforceWriter.java:287)
at org.talend.components.salesforce.runtime.SalesforceWriter.logout(SalesforceWriter.java:518)
at org.talend.components.salesforce.runtime.SalesforceWriter.close(SalesforceWriter.java:512)
at org.talend.components.salesforce.runtime.SalesforceWriter.close(SalesforceWriter.java:49)
at jr.testattachment_0_1.TestAttachment.tFixedFlowInput_1Process(TestAttachment.java:1013)
at jr.testattachment_0_1.TestAttachment.runJobInTOS(TestAttachment.java:1340)
at jr.testattachment_0_1.TestAttachment.main(TestAttachment.java:1197)
I am not sure if this is a problem with Talend or with changes made to Salesforce.com in the Summer '16 release - I suspect the latter. Nevertheless, we are no longer able to load attachments via the tSalesforceOutput component. Using tSalesforceOutputBulkExec is not an option as it is not possible to load attachments via the Bulk API ().
Please advise how to load attachments to Salesforce.com using the Summer '16 release and Talend Open Studio.
Regards, Joachim Rösecke
I believe, for TOS this bug will only be fixed in 6.3.1. Subscription customers can receive a patch via the Customer Portal. With this patch it works again.
Hi Thomas
It is a really simple job (somehow I cannot upload pictures):
tFixedFlowInput --> tSalesforceOutput
Schema & Values:
Body (String): "VGhpcyBpcyBhIHRlc3QgZmlsZQ==" (plain text file holding a test string)
ParentId (String): "001U0000003fyKi" (you will have to change this as it is an account Id from my org)
ContentType (String): "text/plain"
Name (String): "Testfile.txt"
This job worked previously - I believe even in 6.2.0. I suspect it stopped working after Summer '16 was released by Salesforce.com. I would not rule out that it is not a Talend 6.2 issue and that there was a change at Salesforce.com. If this is the case, it should be reflected in the Talend component to enable it for attachment uploads. I have also asked Salesforce.com if they changed anything but due to the lack of developer support for my organization I was not able to get an answer.
Regards, Joachim
I believe, for TOS this bug will only be fixed in 6.3.1. Subscription customers can receive a patch via the Customer Portal. With this patch it works again.