SAQL Statements
A query is made up of statements. Each SAQL statement has an input stream, an operation, and an output stream.
-
Uses existing data to predict future data points. The
arimaxstatement must follow a projection statement in your query. Perform any filtering pre-projection or after thearimaxstatement. -
Use
cogroupto blend data from two or more data streams into a single data stream. The data streams must have at least one common field. -
Use
fill()to fill in any gaps in date fields. You most often usefill()before using thetimeseriesstatement. By specifying the date fields to check,fill()creates a row that contains the missing month, day, week, quarter, or year and includes a null value. To include values outside the bounds of your data’s date range, specify a start date and end date to override existing limits. The function returns the missing date rows with null values. -
Selects rows from a dataset based on a filter predicate.
-
Applies a set of expressions to every row in a dataset. This action is often referred to as projection.
-
Organizes the rows returned from a query into groups. Within each group, you can apply an aggregate function, such as
count()orsum()to get the number of items or sum, respectively. -
rollupis a subclause ofgroup-bythat creates and displays aggregations of grouped data. The output ofrollupis based on column order in your query. -
Use the
joinstatement with thejoin_typeto create semi-join or anti-join results. -
Limits the number of results that are returned. If you don’t set a limit, queries return a maximum of 10,000 rows.
-
Loads a dataset. All SAQL queries start with a
loadstatement. -
Use
offsetto page through the results of your query. -
Sorts in ascending or descending order on one or more fields.
-
Returns a random sample from a large dataset, where each data point has an equal probability of being selected. This keyword uses the Bernoulli distribution.
-
Uses existing data to predict future data points. The
timeseriesstatement must follow a projection statement in your query. Perform any filtering pre-projection or after thetimeseriesstatement. -
Combines multiple result sets into one result set. The result sets must have the same field names and structure. You can use a different dataset to create each result set, or you can use the same dataset.