How to use Standard Reports & Dashboards with Big Objects?
In order to achieve a competitive edge, a business must implement a highly comprehensive business intelligence platform. An efficient business intelligence platform offers effective reporting, analytics, and dashboards. The prime goal is to empower the end-user with all the business information & results they need to drive dynamic decision-making.
The ability to perform advanced reporting and analytics has become vital for enterprises of every size. In order to make more informed and result-driven business decisions, processing timely data along with top-notch reporting & analytics is the key. Reporting & Analytics has been one of the top features of any Salesforce application, whether it’s Sales Cloud, Service Cloud or Marketing Cloud. When we talk about Sales Cloud, Service Cloud, or Marketing Cloud; the data is quantitive & creating reports is seamless. But how about using standard reports & dashboards when the data is of some billion records? Yes, we are talking about Big Objects.
ALSO READ: Unlocking Big Objects & it’s Top Benefits
Keeping billions of records won’t do any good if you are not using them for analytics. However, while working with billions of records, it’s not feasible to build reports or dashboards directly from that data. So, standard SOQL or Async SOQL is being used to write a query that can give you the data you need. The working dataset can later be stored in a custom object and can be used for reporting, dashboards, or any other Lightning Platform feature.
Difference between Standard SOQL & Async SOQL
SOQL & Async SOQL both have similar kinds of abilities. However, both the queries can be used in different scenarios.
Async SOQL is used;
- While querying billions of records.
- To ensure the completion of your query.
- When not aggregating queries or filtering outside of the index.
Standard SOQL is used;
- While displaying the results in the UI in real-time.
- If you want the results available immediately for manipulation within a block of Apex code.
- When you know that the query returns a small amount of data.
While querying Big Objects, Async SOQL is being used because of the sheer size of the data. It is a highly scalable solution that uses a subset of SOQL commands. So, users who are familiar with SOQL queries can easily use Async SOQL. Other benefits of Async SOQL are;
- It schedules & runs queries asynchronously in the background, so it can run queries that usually time out with regular SOQL.
- With Async SOQL, multiple queries can be run in the background while monitoring their completion status.
- Async SOQL is the most efficient way to process a large amount of data in a Big Object.
How to use Async SOQL for Standard Reports & Dashboards with Big Objects?
To create standard reports & dashboards with Big Objects, you need to follow the below process;
Identify the Big Object that holds the data for which you need a report.
Create a custom object. This object holds the working dataset for the Big Object data that you want to report on.
Create an Async SOQL query that builds your working dataset by pulling the data from your Big Object into your custom object.
- Log in to Workbench.
- Select Queries, then Async SOQL.
- For the Source object, choose the big object that you chose in the Step-1.
- Select the source fields and filter criteria.
- Set the operation type to INSERT.
- For the Target object, choose the custom object from which you created in Step-2.
- Map the source fields from the big object to the target fields in the custom object.
- Now run the query and wait until it completes. Run time depends on the volume of data.
After the query runs, query the custom object in Workbench to see that the data is there.
Now build a report using the working dataset you created.
- From Setup, enter Report Types in the Quick Find box, then select Report Types.
- Create a custom report type.
- For the Primary Object, select the custom object created by you in the Step-2.
- Set the report to Deployed.
- Run the report.
The information in the working dataset can be used not only in the reports but also in the dashboards or any other Lightning Platform features.
To know more about Big Objects and how you can use it for Salesforce data, get in touch with our experts.