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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
smathew2949
Contributor III
Contributor III

how to pass namespace to field and entities of salesforce at runtime

How can I develop a 

Talend

 job to handle the situation where I have two 

Salesforce

 environments, one called 

Dev

 and the other called QA? The Dev environment does not have namespaces associated with entities and their fields, while the QA environment has a managed package, so entities and their fields have namespaces. 

Labels (3)
4 Replies
Anonymous
Not applicable

Hello @sherin mathew​ ,

In the talend job, you can add 2 Contexts : Dev and QA, and define a context variable namespace like the below

You can select the Default context environment while running the job

0695b00000htUEUAA2.pngthen in the job, for the tSalesforcexxx component (e.g. tSalesforceInput), you can use the context variable (e.g. context.namespace) in it's SOQL query string or Module Name

 

For context usage, please refer to the article:

https://help.talend.com/r/en-US/7.3/studio-user-guide/creating-context-group-and-contexts

 

best regards

Aiming

 

smathew2949
Contributor III
Contributor III
Author

@Aiming Chen​ Thank you for your answer however the main challenge here with this approach is when these fields are used in tmap they are not recognized pasting a screenshot below which is not working if you have come across any solution to this please let me know thanks in advance

0695b00000htUUhAAM.png0695b00000htUUcAAM.png

Anonymous
Not applicable

@sherin mathew​ ,

Please use context.name_space insteadof row36.context.name_space in tMap

smathew2949
Contributor III
Contributor III
Author

@Aiming Chen​ we have a scenario where there is an entity named "Account_c". However, in the QA environment, the same entity is referred to as "Test_Account__c". Furthermore, this account entity has a field named "address" in the development environment, it is called "address__c" in Dev and "Test_address__c" in QA.

Considering this context, the challenge is how to handle this situation in the Talend JOB, specifically in the "tMap" component, where we may need to dynamically pass the field name appended with the appropriate namespace at runtime. It's worth noting that we also need to perform joins on these fields.