Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
offset
Use offset to page through the results of your
query.
Syntax
1result = offset rows number;Usage
Skips over the specified number of rows when returning the results of a query. You typically use offset to paginate the query results.
When using offset in your SAQL statements, be aware of
these rules:
- The order of filter and order can be swapped because it doesn't change the results
- offset must be after order
- offset must be before limit
- There can be no more than one offset statement after a foreach statement
Example - Return Rows 51–101
This example loads the opportunity dataset, sorts the rows in alphabetical order by account
owner, and returns rows 51–101:
1q = load "DTC_Opportunity";
2q = order q by 'Account_Owner';
3q = foreach q generate 'Account_Owner' as 'Account_Owner', 'Account_Type' as 'Account_Type', 'Amount' as 'Amount';
4q = offset q 50;
5q = limit q 50;