Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
parasarora
Contributor
Contributor

Unable to read linked objects via SOQL in Salesforce generic talend job for multiple modules via dynamic schema

Hi,

i have made a generic job for loading the data from Salesforce API to csv which uses the below structure:

tFileInputDelimited_1 ----> tFlowToIterate_1 ---> tSalesforceInput_1 ---> tFileOutputDelimited_1. 

 

In this case , when i am passing the schema as dynamic in tSalesforceInput_1 . It is skipping linked columns from a linked module within a query (like Account.name) when we get the output . As i have gone through the doc which says that :

To retrieve a column from a linked module it is necessary to define the column in a particular manner in the Edit schema view, otherwise the relationship query will not work. The correct syntax is: NameofCurrentModule_NameofLinkedModule_NameofColumnofInterest

 

If i follow the above rule for linked object , i will not be able to make the job as generic.

 

Is there any way through which i can change the metadata of those columns of linked object and can still use the dynamic schema as i have only this option to make the job generic ? Please provide solution.

Labels (2)
4 Replies
manodwhb
Champion II
Champion II

@parasarora ,salesforce linked query will not work in the talend,since you need to do physical lookup with that table to get any columns form the linked objects.

TRF
Champion II
Champion II

Not sure about the dynamic schema but regarding the question about accessing linked object's fields, the correct syntax is "relationName_fieldName" for the schema field as soon as the SOQL syntax is "relationName.fieldName".

For custom relationship, replace the "__c" in the field API name for the child object by "__r".

For example, if you have a custom relationship between Contact (child) and Account (parent) named "SuperStar__c", you'll get the Account Name using "SuperStar__r.Name" for the SOQL query to populate the "SuperStar__r_Name" field into your Talend schema.

Hum... is that what you are looking for?

parasarora
Contributor
Contributor
Author

So watever approach you are talking about , it would be applicable only when i populate the schema for a particular object in a job. here the question is how can i make the job generic for multiple objects where schema is not known in prior ?

TRF
Champion II
Champion II

I'm afraid this is not possible using tSalesforceXxxx component (but I may be wrong).