Salesforce metadata - How to refresh schemas correctly?

One Star

Salesforce metadata - How to refresh schemas correctly?

I've tried several ways to refresh Salesforce metadata, and the problem I run into is that the only way I see to "re-get" the data from salesforce is to right click the connection and go to "retrieve modules" - However when I do this, I get 2 copies of whatever schema I had. Trying to delete the old one of them becomes problematic as well. Can anyone tell me how to update a schema from salesforce?
Community Manager

Re: Salesforce metadata - How to refresh schemas correctly?

Hi
Not sure I understand you well, select the module and click on the 'Check connecton' button, it will retrieve the schema again.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Salesforce metadata - How to refresh schemas correctly?

I have 4 objects in salesforce in my schema. Clicking on the single object I wanted to update and clicking "check connection" downloaded all schemas (which is fine) but also created duplicates of all the metdata.
i.e. I started out with schemaa__c, schemab__c etc. after doing as you described, I have schemaa__c, schemaa__c, schemab__c, schemab__c
Also, the "new" schemas it created each has 80 fields... Even though the originals don't.
I can provide screenshots if needed.
One Star

Re: Salesforce metadata - How to refresh schemas correctly?

Was this ever resolved? The methodology for refreshing the schema of a Salesforce object/record seems broken. When I add a field to an object/record in Salesforce, then right-click it and choose "Retrieve Salesforce Schemas", I get a dialog which seems to let me refresh, yet when it completes, the number of fields is still the same. I've also experienced the duplicating behavior the OP noted above. Can someone provide some guidance on how to effectively interact with the Salesforce schemas? The User Guide is pretty sparse on the Salesforce metatdata - not well-documented. Thanks - Ben
One Star

Re: Salesforce metadata - How to refresh schemas correctly?

Trying again - still no luck with this process. We've added a field to a table in Salesforce and I need to refresh the schema for that table to pick up the new field and propagate to other objects in my job(s). How do I do this without without breaking everything? The only way I've been able to do this just feels wrong: have had to delete the schema (table), empty the trash, then retrieve it again and re-associate it with the input component in my job. Actually, I think I even had to delete the component and add it again, as it just wouldn't "let go" of the old schema.
Thanks in-advance for any guidance. Loving Talend...awesome tool! -Ben
EDIT: restarted Talend, and now I get duplicate objects. Please see attached image. Hope this gets fixed soon! Maybe I should outline steps to reproduce and file a bug?
One Star

Re: Salesforce metadata - How to refresh schemas correctly?

Benu,
I already entered a bug ticket for this issue. There are two workarounds.
1. Create a new salesforce connection and retreive the modules.
2. Delete the changed salesforce object under the connection, delete it from recyclebin and then do a "Retrieve Salesforce modules" again. When you do this, DO NOT USE FILTER. I had a webex meeting with Talend Representative and we figured out that USING FILTER is causing duplicates. Instead of using the filter to search the object, just scroll thru the list of objects and select which ever is necessary.
Thanks,
Balaji.
One Star

Re: Salesforce metadata - How to refresh schemas correctly?

Thanks Balaji. The workarounds you suggest do allow one to get updated schemas from Salesforce, yet they break the connection between the metadata and existing jobs with components drawing information from the metadata objects. So, while the workarounds are important, they don't address the underlying problem. I have to admit, I just updated to v5.x of TOS last week and haven't had a chance to see if this is magically fixed, yet. Hope to do that shortly.
EDIT (11:05am Pacific): tried again; same behavior as I posted previously. Smiley Sad
Ben
One Star

Re: Salesforce metadata - How to refresh schemas correctly?

Last week, I got an email saying that this has been fixed in 5.0.3 and 5.1.0. See here.
http://jira.talendforge.org/browse/TDI-19969
I haven't had a chance to verify this as my company is using TIS4.2.4 and we may not upgrade to > 5.0 in the near future.
Thanks,
Balaji.
One Star

Re: Salesforce metadata - How to refresh schemas correctly?

Wouldn't you know it? I'm on r78327-V5.0.2 - I think I'll go download the latest version and check it out. Thanks for the tip, Balaji! -Ben
One Star

Re: Salesforce metadata - How to refresh schemas correctly?

Let me know if you can confirm that this has been fixed. I can talk to my company and ask them to push Talend as a patch for this defect.
Thanks,
Balaji.
One Star

Re: Salesforce metadata - How to refresh schemas correctly?

Talend TOS, installed as TOS_DI-Win32-r79245-V5.1.0M1, does seem to correct this problem. A cautionary word: when using the "Retrieve Salesforce Modules" command to refresh existing schema definitions, if you un-check a Salesforce object, it will be removed from your metadata store. So, I think best practice is probably to leave everything checked, unless you really want to remove it from your metadata. Also, it looks like there's no automation for refreshing the schema on components already in jobs - I had to select the schema again within the component config tab. Still, this is definitely an improvement.
Thanks again for prompting some action on this topic!
Ben
One Star

Re: Salesforce metadata - How to refresh schemas correctly?

after the workaround in 5.0.2 you can save the schema from the salesforce component metadata and import it into output node (or input?)
One Star

Re: Salesforce metadata - How to refresh schemas correctly?

Hi Stephen. I never tried the workaround, as the fix for this issue was released. So far, it seems to be working well. I suggest avoiding the hassle of the workaround and just upgrading. -Ben
One Star

Re: Salesforce metadata - How to refresh schemas correctly?

This is still an issue in latest version of Talend. When I try to refresh the schema it generates multiple copies. I really love Talend. I just wish the SFDC Schema Refresh issues could get resolved as this is our primary Data Source we use with Talend.
One Star

Re: Salesforce metadata - How to refresh schemas correctly?

Just a note that although I encountered this problem in the past, it now appears to work correctly for me. I am using 5.1.1
Added a field in SFDC. Right clicked connection in Talend and selected "Retrieve Salesforce Modules". Untick the relevant object, re-tick it, and click finish. The object then updates with the field.