IN Clause

Used in the LOAD MODULE statement to bind inputs in the module to inputs in the parent scope.

Syntax

IN
		input1-inModule = input1-parentScope [,...]

Components

input1-inModule

The name of the input stream or window defined in the module.

input1-parentScope

The name of the stream or window in the parent scope. Bind the module input stream or window to this stream.

Usage

The streams or windows in the parent scope can have any visibility type. Schemas between the bound input streams or windows must be compatible. Schemas are compatible if any one of these requirements is met:
  • The number and datatypes of the columns match and are in the same order.
  • The stream in the parent scope has more columns than the module stream, and the initial column datatypes match and are in the same order. Any additional columns are ignored by the module, and cannot be primary key columns.
  • The parent module stream has fewer columns than the module stream, and the initial column datatypes match and are in the same order. Any additional columns inside the module stream are filled with a NULL value. Primary key columns cannot be null.
Note: For each of these requirements, column names need not match.

When associating inputs, a parent level object that does not have a primary key cannot be bound to a module-level object that requires a primary key. For example, a stream cannot be bound to a window.

Restrictions

  • All input elements in the module must be bound for the IN clause.

Example

This example shows the input streams inside the module (modMarketIn1 and modMarketIn2) being bound to their respective streams in the parent scope, marketIn1 and marketIn2.

LOAD MODULE filterModule AS filter1
IN modMarketIn1=marketIn1, modMarketIn2=marketIn2
OUT modMarketOut=marketOut;