Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CsvFormatter.php #1

Merged
merged 1 commit into from
Jan 22, 2024
Merged

Update CsvFormatter.php #1

merged 1 commit into from
Jan 22, 2024

Conversation

zack-carlson
Copy link
Owner

@zack-carlson zack-carlson commented Jan 18, 2024

For Bulk Queries with CSVs that rely on chunking, users may need to return headers with the following values:

'Sforce-Limit-Info' =>
'Sforce-Locator' =>
'Sforce-NumberOfRecords' =>

This proposed change would allow that.

If this would be a breaking change for other instances reading CSV data or too risky, Could there perhaps include a separate formatter for "CSV" such as "csv-headers" or others with "*-headers"?

For example:

$data = Forrest::get(
          "/services/data/v59.0/jobs/query/" . $bulkJob["id"] . "/results?maxRecords=5",
          [],
          [
              "format" => "csv",
              "Accept" => "text/csv"
          ]
      );

Will only return a CSV with 5 rows in the $data attribute. Sending the headers of this request will allow you to loop while "Sforce-Locator" is set to retrieve all rows.

For Bulk Queries with CSVs that rely on chunking, users may need to return headers with the following values: 

'Sforce-Limit-Info' => 
'Sforce-Locator' => 
'Sforce-NumberOfRecords' => 

This proposed change would allow that.
@zack-carlson zack-carlson merged commit 7ab2d80 into master Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant