Salesforce Batch Source
The Salesforce batch source plugin is available in the Hub.
Plugin version: 1.5.0
This source reads sObjects from Salesforce. Examples of sObjects are opportunities, contacts, accounts, leads, any custom object, etc.
The data which should be read is specified using SOQL queries (Salesforce Object Query Language queries) or using sObject and incremental or range date filters.
Configuration
Property | Macro Enabled? | Version Introduced | Description |
---|---|---|---|
Reference Name | No | Â | Required. Used to uniquely identify this source for lineage, annotating metadata, etc. |
Use Connection (yes/no toggle) | No | 1.5.0 | Optional. Use an existing connection. If a connection is used, you do not need to provide the credentials. |
Browse Connections | Yes | 1.5.0 | Optional. Name of the connection to use. |
Username | Yes | Â | Required. Salesforce username. |
Password | Yes | Â | Required. Salesforce password. |
Security Token | Yes | Â | Optional. Salesforce security token. If the password does not contain the security token the plugin will append the token before authenticating with Salesforce. |
Consumer Key | Yes | Â | Required. Application Consumer Key. This is also known as the OAuth client ID. A Salesforce connected application must be created in order to get a consumer key. |
Consumer Secret | Yes | Â | Required. Application Consumer Secret. This is also known as the OAuth client secret. A Salesforce connected application must be created in order to get a client secret. |
Login Url | Yes | Â | Required. Salesforce OAuth2 login URL. Default is |
Connection Timeout | Yes | 1.4.4 | Optional. Maximum time in milliseconds to wait for connection initialization before it times out. Default is 30000 milliseconds. |
Proxy URL | Yes | 1.4.5 | Optional. Proxy URL. Must contain a protocol, address and port. |
SOQL | Yes | Â | Optional. An SOQL query to fetch data into source. Examples: |
SObject Name | Yes |  | Optional. Salesforce object name to read. If value is provided, plugin will get all fields for this object from Salesforce and generate SOQL query ( There are also sObjects that are not supported in the Bulk API of Salesforce. When a job is created using an object that is not supported in the Bulk API, “Entity is not supported by the Bulk API“ is thrown. These objects are also not supported by Einstein Analytics as it also uses Bulk API for querying data. Below is a non-comprehensive list of sObjects that are not currently available in the Bulk API:
Cases when BULK API is not used:Â When query length sends the query to Salesforce in order to receive the array of batch info, there is one case in which Bulk API is not used. If query is within the limit, it executes the original query, otherwise, switches to wide object logic, for example generates Id query to retrieve batch info only for Ids that will be used later to retrieve data using SOAP API. |
Last Modified After | Yes |  | Optional. Filter data to only include records where the system field If no value is provided, no lower bound for |
Last Modified Before | Yes |  | Optional. Filter data to only include records where the system field Specifying this along with |
Duration | Yes |  | Optional. Filter data read to only include records that were last modified within a time window of the specified size. For example, if the duration is ‘6 hours’ and the pipeline runs at 9am, it will read data that was last updated from 3am (inclusive) to 9am (exclusive). The duration is specified using numbers and time units:
Several units can be specified, but each unit can only be used once. For example, |
Offset | Yes | Â | Optional. Filter data to only read records where the system fieldÂ
Several units can be specified, but each unit can only be used once. For example, |
SOQL Operation Type | No | Â | Optional. Specify the query operation to run on the table. If Default operation is |
Enable PK Chunking | Yes |  | Optional. Primary key (PK) Chunking splits query on large tables into chunks based on the record IDs, or primary keys, of the queried records. Salesforce recommends that you enable PK chunking when querying tables with more than 10 million records or when a bulk query consistently times out. However, the effectiveness of PK chunking depends on the specifics of the query and the queried data. We do not recommend enabling PK chunking when querying a large table and filtering out most of the data. A separate query is created for each chunk, so enabling PK chunking on a large table can end up counting as thousands of queries against the quota. For example, let’s say you enable PK chunking for the following query on an Account table with 10,000,000 records.
Assuming a chunk size of 250,000 the query is split into the following 40 queries. Each query is processed parallely Queries:
PK chunking works only with queries that don’t include PK chunking only works with the following objects:
Support also includes custom objects, and any Sharing and History tables that support standard objects. |
Chunk Size | Yes | Â | Optional. Specify size of chunk. Maximum Size is 250,000. Default Size is 100,000. |
SObject Parent Name | Yes | Â | Optional. Parent of the Salesforce Object. This is used to enable chunking for history tables or shared objects. |
Salesforce Date Format Examples
Format | Format Syntax | Example |
---|---|---|
Date, time, and time zone offset | YYYY-MM-DDThh:mm:ss+hh:mm | 1999-01-01T23:01:01+01:00 |
 | YYYY-MM-DDThh:mm:ss-hh:mm | 1999-01-01T23:01:01-08:00 |
 | YYYY-MM-DDThh:mm:ssZ | 1999-01-01T23:01:01Z |
Data Type Mapping
Salesforce Data Type | CDAP Schema Data Type |
---|---|
_bool | boolean |
_int | int |
_long | long |
_double, currency, percent, geolocation (latitude), geolocation (longitude) | double |
date | date |
datetime | timestamp (microseconds) |
time | time (microseconds) |
picklist | string |
multipicklist | string |
combobox | string |
reference | string |
base64 | string |
textarea | string |
phone | string |
id | string |
url | string |
string | |
encryptedstring | string |
datacategorygroupreference | string |
location | string |
address | string |
anyType | string |
json | string |
complexvalue | string |
Â
Created in 2020 by Google Inc.