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

Feature request: Bulk API 2.0 Query #1223

Closed
douglascayers opened this issue Oct 6, 2021 · 4 comments
Closed

Feature request: Bulk API 2.0 Query #1223

douglascayers opened this issue Oct 6, 2021 · 4 comments
Labels
feature Issue or pull request for a new feature

Comments

@douglascayers
Copy link

Is your feature request related to a problem? Please describe.

  • I need to query or count records in very large objects (hundreds of thousands to millions of records).
  • The force:data:soql:query returns a max of 50,000 records and if there's more than that then the command doesn't show me results but rather gives error:

(node:6739) Warning: The query result is missing 738431 records due to a 50000 record limit. Increase the number of records returned by setting the config value "maxQueryLimit" or the environment variable "SFDX_MAX_QUERY_LIMIT" to 738431 or greater than 50000.

  • Even if I increase the environment variable "SFDX_MAX_QUERY_LIMIT" to a sufficiently large value, I get the same error.

What are you trying to do

  • I would like to use force:data:bulk:query or similar command to conveniently use the Bulk API 2.0 Query API.

Describe the solution you'd like

  • A new command, force:data:bulk:query, with similar parameters as force:data:soql, to provide a convenient abstraction over the effort to set up and poll for results of a bulk query job.
  • The effort to create a bulk query job and poll for results, then download the results would be encapsulated in this new command.
  • To the end-user, usage would be no different than force:data:soql except the knowledge it's running a bulk query.

Parameters:

--apiversion      -- override the api version used for api requests made by t
--json            -- format output as json
--loglevel        -- logging level for this command invocation
--perflog         -- get API performance data
--query           -- SOQL query to execute
--resultformat    -- result format emitted to stdout; --json flag overrides t
--targetusername  -- username or alias for the target org; overrides default 
--wait            -- minutes to synchronously wait for results (think force:package:install --wait)

Describe alternatives you've considered

  • Use another tool, like Data Loader, or write my own code using curl or jsforce library. These are not preferred because I'd like to script the bulk queries without developing something new myself, and be able to take advantage of orgs authorized with the CLI so that I don't have to fret about creating authorization headers.

Thanks

@douglascayers douglascayers added the feature Issue or pull request for a new feature label Oct 6, 2021
@github-actions
Copy link

github-actions bot commented Oct 6, 2021

Thank you for filing this feature request. We appreciate your feedback and will review the feature at our next grooming or sprint planning session. We prioritize feature requests with more upvotes and comments.

@uip-robot-zz
Copy link

This issue has been linked to a new work item: W-9997550

@jclark-dot-org
Copy link

Please include an option to submit a Bulk Api 2.0 Tooling query as well - MetadataComponentDependency is kinda useless without Bulk API support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Issue or pull request for a new feature
Projects
None yet
Development

No branches or pull requests

4 participants