Cmdlets for Salesforce

Build 25.0.9434

QueryBatch

Executes a batch query in Salesforce, allowing large dataset retrieval in multiple chunks.

Input

Name Type Description
Query String The query to execute using the Bulk API. Can be a SQL-like or SOQL query, based on the QueryMode. This is required unless both JobId and BatchId are provided.
QueryMode String Specifies how the query will be processed: as a SQL-like client-side query (with fallback for unsupported syntax), or as a native Salesforce Object Query Language (SOQL) query sent directly to Salesforce. SOQL mode does not support features such as COUNT, GROUP BY, OFFSET, relationship fields, or wildcards (*).

The allowed values are SQL, SOQL.

The default value is SOQL.

JobId String The ID of the Bulk API job. Required if BatchId is also specified.
BatchId String The ID of the batch to retrieve results from. Required if JobId is specified.
ChunkSize String Optional. Enables query result chunking to improve performance on large datasets. Recommended for datasets exceeding 10 million records. Set to 0 to disable chunking. Maximum chunk size is 250,000.

The default value is 30000.

ConcurrencyMode String Defines how batches are processed. 'Parallel' (default) processes batches concurrently for speed. 'Serial' processes one batch at a time to avoid locking and contention issues.

The allowed values are Parallel, Serial.

The default value is Parallel.

SkipErrors String Indicates whether to skip failed batches and return results from completed ones. Useful for partial success scenarios.

The allowed values are true, false.

The default value is false.

Rows@Next String Used internally for paginating through query results. Do not set manually.

Result Set Columns

Name Type Description
QueryJobId String The ID of the job created to run the query.
QueryBatchId String The ID of the batch created to process the query.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9434