1

I'm looking at ways to execute an Async SOQL query for a Big Object using Apex. The documentation suggests this can only be done using the Connect REST API.

https://developer.salesforce.com/docs/atlas.en-us.bigobjects.meta/bigobjects/async_query_running_queries.htm

I have checked the "Connect in Apex" (ConnectApi Namespace) for any supporting methods, but don't see any available.

My assumption therefore is that the only option to initiate this from Salesforce would be an outbound webservice call calling back into Salesforce via the REST API.

Is anyone aware of any better option?

0

You can make a REST post call in Apex to query Big Objects. Take a look at "How to Use Async SOQL to Query Big Objects" within the Trailhead at https://trailhead.salesforce.com/en/content/learn/modules/big_objects/big_objects_querying

2
  • 1
    Thanks Peter. Aware of this option, just seems odd that we have to make a webservice callout to access on-plaform(ish) functionality.
    – Andrew
    May 17 '21 at 16:17
  • @Andrew this is not the only usecase where you would have to do that, there are also some other like, as a guest user you can't post to chatter, so you need to make a rest api call to a named credentials that is configured as a different user that has permission to post to chatter. It's certainly odd that we can't directly do it without REST. May 17 '21 at 16:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.