Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

On this page

Table of Contents
maxLevel2
absoluteUrltrue

...

You can use this Snap to perform bulk SOQL queries using Salesforce Bulk API 2.0.
Image Removed
Image Added

Prerequisites

Valid Salesforce OAuth 2 account with Read permissions.

...

The error view contains error, reason, resolution and stack trace. For more information, see Handling Errors with an Error Pipeline
View TypeType of ViewNumber of ViewsExamples of Upstream and Downstream SnapsDescription
Input Document
  • Min: 0
  • Max: 1
  • Mapper Snap
  • Filter
  • Router
A document containing values required for the bulk query.
OutputDocument
  • Min: 1
  • Max: 1
  • Document to Binary
  • Salesforce Upsert

A document containing the results of the query performed by the Snap.

Error

Document

  • Min: 1

  • Max: 1

N/A

Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter while running the Pipeline by choosing one of the following options from the When errors occur list under the Views tab. The available options are:

  • Stop Pipeline Execution: Stops the current pipeline execution when the Snap encounters an error.

  • Discard Error Data and Continue: Ignores the error, discards that record, and continues with the rest of the records.

  • Route Error Data to Error View: Routes the error data to an error view without stopping the Snap execution.

Learn more about Error handling in Pipelines.

Snap Settings

 Salesforce Bulk QueryService Version* Salesforce Bulk QuerySOQL Query*Max Records Per Set*Maximum Retry Attempts
FieldField TypeDescription

Label*

DefaultValue:Salesforce Bulk Query
Example
:Salesforce Bulk Query

String

Specify the name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your Pipeline.


Service Version*

Default Value:

52.0 
Example
:

41.0

String/Expression/Suggestion

Specify the version number associated with the Salesforce service that you want to connect to. Alternatively, click the Suggestion  icon to fetch the list of versions and select the desired version.


SOQL Query*

DefaultValue: 52.0 
Example41.0

None
Example
:"select FirstName, LastName from " + $object + " order by Name LIMIT 5"

"SELECT Name FROM Account"
"SELECT Id,Name,Phone FROM Account WHERE Id='" + $Id + "'and
Name='" + $name + "'"

String

Specify the query in SOQL format. You can enter a JavaScript expression, which is evaluated each time the Snap is executed. As in the second example below, on each document received from the input view, the % symbols will be replaced with the value pointed to by the JSON path $.Id in the input data.
Example:

"SELECT Name FROM Account"
"SELECT Id,Name,Phone FROM Account WHERE Id='" + $Id + "'and
Name='" + $name + "'"



Note
titleUsing quotes in the WHERE clause
  • Do not use quotes for field names in the WHERE clause. Using quotes results in an error.
  • Use only single quotes for values in the WHERE clause as using double quotes results in an error.
  • The above rules do not apply when you are using SnapLogic expressions, you can use quotes for the field names and values as applicable. 
Default


Max Records Per Set*

Default Value:

 [None]

10000
Example
:

 "select FirstName, LastName from " + $object + " order by Name LIMIT 5"

5000

Integer

Specify the number of records that you want the Snap to fetch in a single set.


Default Polling Interval*

Default Value100005
Example
:500010

Polling Interval*

Integer

Specify the number of seconds for which you want the Snap to wait between two queries. At each polling interval, the Snap checks the status of the Bulk API query batch processing.

Minimum value: 1
Maximum value: 60

Polling Timeout*

Default Default Value: 53000
Example
:10300

Polling Timeout*Integer

Specify the number of seconds into the query batch execution before the query fails if it receives no response. If the timeout occurs while waiting for the completion of the query batch execution, the Snap throws a SnapExecutionException.

Minimum value: 10 Default


Maximum Retry Attempts


Default 
Value
30005
Example: 
300
1Integer

Specify the maximum number of retry attempts that the Snap must make in case of a network failure. 

Minimum value: 1

Multiexcerpt include macro
nameretries
pageFile Reader
Default Value5
Example: 1


Include Deleted Records

Default Value: Deselected

CheckboxSelect this checkbox to include deleted records in the query result. This feature is supported in Bulk API version 47.0 or later.

Match Data Type

Default Value: Deselected

Checkbox

Select this checkbox to match the data types of the bulk query job results. On selecting this checkbox, the Snap converts string values to the corresponding data types if the original data type is one of Boolean, Integer, Double, Currency, and Percent. 


Note

The Salesforce response for null values is independent of the selection of the Match Data Type checkbox.


Object Type


Default Value:

String/Expression

Appears on selecting the Match Data Type checkbox.

Specify the object type to match. Alternatively, select an object type from the suggestions list to match the data type.

Retry Interval (seconds)

Default Value:1
Example
:3

Integer

Specify the minimum number of seconds for which the Snap must wait before attempting recovery from a network failure.

Minimum value: 0

Snap Execution

DefaultValue

1

Validate & Execute
Example
:

 3
Snap Execution

Execute only

String

Select one of the three modes in which the Snap executes. Available options are:

  • Validate & Execute: Performs limited execution of the Snap, and generates a data preview during Pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during Pipeline runtime.
  • Execute only: Performs full execution of the Snap during Pipeline execution without generating preview data.
  • Disabled: Disables the Snap and all Snaps that are downstream from it.

Default ValueValidate & Execute
ExampleExecute only

Insert excerpt
Salesforce Batch Create
Salesforce Batch Create
nopaneltrue

Multiexcerpt include macro
nameTemporary Files
pageJoin

Examples

Querying for Contacts in Salesforce Using Upstream Parameters in the Bulk Query Snap

...