FROM Clause: Comma-Separated Syntax

Specify a single input to a query or use to list tow or more inputs in a join or for pattern matching two data sources in a query, in combination with the WHERE clause, using an alternative comma-separated syntax.

Syntax

FROM [ source [ [AS] alias ] [ keep_clause ] ] [, …]

Components

source The name of a data stream, window, or delta stream
alias An optional alias for the stream or window
keep_clause An optional policy that specifies how rows are maintained in the window (it cannot be used with a stream or delta stream)

Usage

Use the FROM clause with comma-separated syntax for single-source queries, inner joins, and queries that use the MATCHING clause. This syntax specifies one or more data sources in a query. Any column or datasource references in the query's other clauses must be to one of the data sources named in this clause.

The comma-separated FROM clause can contain multiple data sources connected with an inner join. The multiple sources are separated by commas. The WHERE clause, required when using comma-separated syntax, creates the selection condition for the join.

Use comma-separated syntax for the FROM clause with a MATCHING clause to specify data sources that should be monitored for a specified pattern. The list of data sources can include only data streams, must include all data sources specified in the MATCHING clause, and cannot include any other data source.

Use aliases to abbreviate stream or window names, and if required, for differentiating between instances when the same data stream or window is used more than once in the FROM clause.