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.
Statements
A SAQL query loads input data,
operates on it, and outputs the result data. A query is made up of statements. Each SAQL
statement has an input stream, an operation, and an output stream.
A statement is made up of keywords (such as filter, group, and order), identifiers, literals, and special characters. Statements can span
multiple lines and must end with a semicolon.
Assign each query line to an identifier called a stream. The only exception is the last line in a query, which doesn't have to be assigned explicitly.
The output stream is on the left side of the = operator and the input stream is on the right side of the = operator.
Example
Each line in this SAQL query is a SAQL statement.
1q = load "Dataset1";
2q = group q by all;
3q = foreach q generate sum('Amount') as 'sum_Amount';