Load Module

Import and load a module.

This example uses the IMPORT statement to load the module defined in the CREATE MODULE example, which is saved as module1.ccl.

The example loads module1.ccl using the IMPORT statement.

IMPORT  'module1.ccl';

The example creates two schemas named StocksSchema and ComputedStocksSchema, a default store named MyStore1, and a memory store named MyStore2.

The example then creates an input window named InStocks that references StocksSchema, and to which it attaches a File CSV Input adapter named csvInStocks.

The example uses the LOAD MODULE statement to load Module1, linking the input window identified within the module to InStocks, and referencing MyStore1. This example does not create a new output window, but assigns a new name (CompStocks2) to the window loaded from Module1. The example also sets a value for the myparam parameter declared in Module1.

LOAD MODULE Module1 AS Module1_instance_01 
   IN rawStockFeed = InStocks
    OUT infoByStockSymbol = CompStocks2 
      Parameters myparam = 1000
    STORES store1=MyStore1;

The example creates an output window named myw2 that references ComputedStocksSchema. SELECT all (*) syntax outputs all data processed by CompStocks2 to myw2.