[resolved] tSalesforceInput - Querying on a custom object and relations

One Star

[resolved] tSalesforceInput - Querying on a custom object and relations

Bonjour,
I have an issue with tSalesforceInput and a custom object that I'm querying.
The object name is Refund__c and have a masterRelation with Case.
I have setup the tSalesforceInput with 3 columns:
> Refund ID
> Case Number | This returns me the ID of the case
> CaseNumber | I named the column like it is mentionned in the documentation (Refund__c__Case_CaseNumber)
This is the query that I'm running :
select Id, Case_Number__c, Case_Number__r.CaseNumber
from Refund__c
Limit 10
The query is returning me information for the 2 first columns but not the last.
I've tried to do this kind of query base on a non-custom object and it worked.
For all my custom object it returns me peanuts.
Any idea to help me solving this issue?
In advance, thank you very much.

Michel.

Accepted Solutions
Four Stars

Re: [resolved] tSalesforceInput - Querying on a custom object and relations

Thanks for the update Andrew.
I was stuck on this today and found your note.
I was battling with the documented syntax of NameofCurrentModule_NameofLinkedModule_NameofColumnofInterest, which actually doesn't work when you include the NameofCurrentModule.
It just needs the linkedcustomobject__r_NameofColumnofInterest as you mention.

All Replies
One Star

Re: [resolved] tSalesforceInput - Querying on a custom object and relations

Bonjour,
I think I have something on my case.
If I understood well the documentation of the component tSalesforceInput, the way to get the column that I want is the following : NameofCurrentModule_NameofLinkedModule_NameofColumnofInterest
I've tried to do a relation query between a non-custom and a custom object, Talend doesn't pull me any results.
The relation between the objects is not "__r" like it is in SalesForce but just an underscore "_".
Relationship queries are working fine for non-custom objects like Account, Case, Contact and Opportunities because the objects names are not containing "_". I think that is the issue.
Anyone to confirm my assumptions?
Thanks and regards,
Michel
One Star

Re: [resolved] tSalesforceInput - Querying on a custom object and relations

3 years late, but I was battling with this today and ended up getting it working. Thought I would post it here as I couldn't find the solution anywhere else.
I believe if you put in your schema Case_Number__r_CaseNumber it will work, basically replacing the . with _
HTH Andrew
Four Stars

Re: [resolved] tSalesforceInput - Querying on a custom object and relations

Thanks for the update Andrew.
I was stuck on this today and found your note.
I was battling with the documented syntax of NameofCurrentModule_NameofLinkedModule_NameofColumnofInterest, which actually doesn't work when you include the NameofCurrentModule.
It just needs the linkedcustomobject__r_NameofColumnofInterest as you mention.