streamBulkQuery
streamBulkQuery(
conn,soql,options?):Promise<StreamBulkQueryResult>
Defined in: packages/simply-core/src/bulk/streamBulkQuery.ts:197
Run a SOQL query through Bulk API v2 and return the merged CSV results as a single stream.
Unlike Connection.bulk2.query(), which routes result pages through jsforce’s HTTP transport
(buffering each page fully into memory before it can be consumed), this fetches each page’s
HTTP response directly and exposes it as one continuous, backpressure-respecting Readable,
so memory usage stays flat regardless of result set size. Pages are fetched lazily, one at a
time, only as the returned stream is consumed.
Parameters
Section titled “Parameters”Connection
The org connection to run the query on.
string
The SOQL query to run.
options?
Section titled “options?”Optional job/polling behavior overrides.
Returns
Section titled “Returns”Promise<StreamBulkQueryResult>
The job ID, record count, and a merged CSV stream of the results.
Throws
Section titled “Throws”If the query job doesn’t report completion after polling.