Retrieving values form Salesforce Activity History

One Star

Retrieving values form Salesforce Activity History

I am trying to retrieve values from the SalesForce Activity History.  The Activity History itself is not directly queryable but can be accessed in a subquery.  The following SOQL query works just fine in SF:
SELECT Id, (SELECT Subject FROM ActivityHistories) FROM Lead LIMIT 5
When I run this query in Talend however I get this...
|Id                |Lead_ActivityHistories_Subject|
|00Q6000000IAUwSEAX|null                          |
|00Q6000000IYWMWEA5|null                          |
|00Q6000000IYwlEEAT|null                          |
|00Q6000000IZBQZEA5|null                          |
|00Q6000000IZNP4EAP|null                          |
The documentation specifies that fields to be returned from linked objects must be specified in the following manner...
To retrieve a column from a linked module, it is necessary to define the column in a particular manner in the Edit schema view. The correct syntax is:

And you can see from the LogRow output that I have tried that here, however I can not get any results for the Subject field no matter what I try.
My sense is that I am simply not correctly specifying the field(s) that I want in the schema (but I could be wrong about that), but I am at a loss as to what to try.  I am not sure if this is relevant but the Subject field that I am after will return what looks like a JSON object.
Anyone have any insight as to how to specify the Subject field here (or what else might be the problem)?  
Thanks in advance.  Any insight is greatly appreciated.
One Star

Re: Retrieving values form Salesforce Activity History

Try to call the column as "Activity_records_Subject" as you are in a master-detail relationship.
Have a look to this link
Hope this helps,