Salesforce Reader - Haufe-Lexware/haufe.no-frills-transformation GitHub Wiki
Using the Salesforce Reader plugin, it is possible to use SOQL queries to retrieve information, leveraging the Salesforce Data Loader.
The Salesforce Reader Plugin completely encapsulates the command line interface of the Salesforce Data Loader in order to create a seamless experience for the ETL developer.
This enables scripting extracting data from Salesforce, which is OOTB not very simply accomplished using the plain Data Loader command line interface.
In order to extract data from Salesforce, use the following source syntax:
<Source config="[path to config file]">soql://[SOQL query]</Source>The configuration of the Salesforce Reader (and Salesforce Writer) is stored in a separate XML configuration file.
The documentation on that can be found on the Salesforce Configuration File page.
Standard Salesforce SOQL queries are supported. All fields which are to be retrieved from Salesforce must be separately defined in the query, as does obviously also the entity.
Example:
<Source config="sfdc_config.xml">soql://select Id, FirstName, LastName from User</Source>This snippet will read the Salesforce Id, first name and last name from the User entity in Salesforce.
Note: Where clauses are also supported.
Please confer with the Salesforce documentation for a complete guide on how to write SOQL statements.