2. Agenda 2
Need for Big Objects
What is a Big Object?
Big Object Use Cases
Considerations for Usage
Demo
Q & A
3. Need for Big
Objects?
3
Nature of Storage Performance Cost
• Master Data
• Business Data
• Operational Data
• Performance
diminishes with
large data sets
• Data retrieval limits
• Limited Data
Storage
4. What is a Big Object? 4
Object that stores & manages
massive data volumes
within Salesforce without
affecting performance.
▶ Does NOT count against org data
storage limits
▶ Processing scale of 1 billion records
▶ Types
Standard (FieldHistoryArchive)
User Defined
Suffixed with “__b”
5. Big Object Use Cases 5
CAPTURE USER
ACTIVITY
Code reviews, time
entries, page views,
field audits etc.
RETAIN HISTORICAL
DATA
Historical data stored
for compliance
360 CUSTOMER VIEW
Ancillary customer
data e.g. Purchase
Details, Transactions
6. Considerations for Big Objects Usage 6
General
UI/ UX Data Security
& Access
Analytics Packaging
• Metadata API
• Max. 100 Big Objects per org
• Supports DateTime, Lookup, Number, Text, Long Text Area field
types only
• Triggers, Flows, Processes, Salesforce App are unavailable
• Async SOQL is restricted to specific licenses
• Standard UI unavailable (Tabs, Detail
Pages, List Views)
• Works with Visualforce Pages or
Lightning Components
• Supports Object & Field
Permissions only
• Included in Managed Packages
• No support for Report Builder
• Einstein Analytics supported
7. Demo 7
• Use Case
• Big Objects Schema Definition
• Big Object Record Creation
• Data Retrieval
• Standard SOQL
• Async Soql
8. Demo – Use Case 8
• Extreme Gaming is globally renowned provider of online arcade games. They have an
extremely popular game which has thousands of online players.
• This company intends to store all the interactions the players make in a single play of the
game within Salesforce.
• The game has numerous interactions per day which multiplied with its huge set of players
results in tons of data.
9. Object Definition 9
Customer Interactions (Customer_Interaction__b)
# Field Label Field Name Required? Type Indexed Order
1 In-Game Purchase In_Game_Purchase__c Text (16)
2 Level Achieved Level_Achieved__c Text (16)
3 Lives Used Lives_This_Game__c Text (16)
4 Game Platform Game_Platform__c Yes Text (16) ASC 2
5 Score This Game Score_This_Game__c Text(16)
6 User Account Account__c Yes Lookup (Account) DESC 1
7 Date of Play Play_Date__c Yes DateTime DESC 3
8 Play_Duration__c Play_Duration__c Yes Number (18, 2)
10. Deploying your Schema 10
SchemaDefinition
Package.xml
Metadata Type
Object File
Object Definition
(Name, Label, Fields)
Indexes
Permissions File Profile or Permission Set Access
11. Big Object Data Manipulation 11
• Apex CRUD
• Create / Update (Idempotent Behavior)
• insertImmediate(sobject) OR insertImmediate(sobjects)
• Read
• SOQL Queries
• Async SOQL
• CSV Files
• API (Bulk API, SOAP API)
12. Using Standard SOQL with Big Objects 12
Executes
synchronously
All Indexes are
mandatory
Comparison
Operators
(=, <, >, <=, >=, IN)
Not Supported
Operators
(!=, LIKE, NOT IN, EXCLUDES, INCLUDES)
13. Using Async SOQL with Big Objects 13
{
"jobId":"08PD000000003kiT",
"message":"",
"query":"SELECT Account__c, In_Game_Purchase__c FROM Customer_Interaction__b WHERE Play_Date__c='2018-
01-05'",
"status":"New",
"targetObject":"Customer_Interaction_Analysis__c",
"targetFieldMap":{
"Account__c":"Account__c",
"In_Game_Purchase__c":"Purchase__c"
},
"targetValueMap":{
"$JOB_ID":"BackgroundOperationLookup__c",
"Copy fields from source to target":"BackgroundOperationDescription__c"
}
}
14. SOQL Vs Async SOQL Usage Considerations 14
Feature Standard SOQL Async SOQL
Mode of Execution Synchronous Asynchronous
Immediate Response Required? Yes No
Expected Result Set Size Smaller Data Sets (Thousands of records) Large Data Sets (Millions of records)
Best Suited For
• Displaying Data on UI
• Manipulations within Apex
• Aggregation
• Summarizing for Analytics
Filter using Non Index fields Yes No
Sample Format
SELECT Game_Platform__c, Play_Date__c
FROM Customer_Interaction__b
WHERE
Game_Platform__c='PC' AND Play_Date__c='2017-09-06'
{
"query": "SELECT Account_c, In_Game_Purchase__c FROM Customer_Interaction__b
WHERE Play_Date__c='2017-09-06'",
"operation": "insert",
"targetObject": "Customer_Interaction_Analysis__c",
"targetFieldMap": {
"Account__c":"Account__c",
"In_Game_Purchase__c":"Purchase__c"
},
"targetValueMap":{
"$JOB_ID“ : "BackgroundOperationLookup__c",
"Copy fields from source to target“ : "BackgroundOperationDescription__c"}
}
15. Additional References 15
Big Object Basics (Trailhead Module)
Big Objects – Bring Data to Force.com (YouTube)
Big Objects Implementation Guide (Salesforce Documentation)