QueryResultsV2
Fetches results for a query job once the job has completed processing.
Input
| Name | Type | Accepts Output Streams | Description |
| JobId | String | False | The ID of the Bulk API V2 job whose results you want to retrieve. |
| Locator | String | False | An optional string token used for paginating through large result sets. Use this to retrieve subsequent segments of the query results. |
| MaxRecords | String | False | Specifies the maximum number of records to include in each result set. Useful for controlling memory usage or managing pagination. |
| FileName | String | False | Optional file name to use when saving the downloaded results locally. Used in combination with LocalPath. |
| LocalPath | String | False | The directory where the query results should be saved as a file. If not provided, the results are returned as in-memory data in the FileData output. |
| Encoding | String | False | Character encoding to apply to the output data. Common values include UTF-8 or ISO-8859-1.
The allowed values are NONE, BASE64. The default value is BASE64. |
| FileStream | String | True | An optional output stream to which the result file data is written. Used only if LocalPath is not set. |
Result Set Columns
| Name | Type | Description |
| Success | String | Indicates whether the query result download completed successfully. |
| Locator | String | A token representing the current batch of query results. Use this to fetch additional results if more records remain. |
| FullPath | String | The full file path, including the name, where the query results were saved. |
| FileData | String | The raw content of the result file, returned as in-memory data if LocalPath is not specified. |