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: 
Anonymous
Not applicable

Salesforce metadata to sql table (create table)

Hi, is it possible to use Talend to create a table in SQL Server with the exact metadata as one Salesforce object? The purpose is to copy all records from salesforce to sql server, but for that we first need to have the exact fields...even the hidden fields!

 

Thank you!

Labels (2)
1 Reply
TRF
Champion II
Champion II

Yes it is, you have to code it by yourself using the salesforce metadata API.

The following lines will give you access to the metadata for objectName object and to an array with all fields:

 

DescribeSObjectResult describeSObjectResult = salesforceConnection.describeSObject(objectName);
Field[] fields = describeSObjectResult.getFields();

Then you can access name, label, datatype and so on for all fields with getName(), getLabel() and getType() methods.

 

Have a look here https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_intro.htm or googlelize for salesforce metadata api example.