Use basic concepts of modularity to create a module that processes raw stock trade information and outputs a list of trades with a price exceeding 1.00.
CREATE SCHEMA TradesSchema ( Id integer, TradeTime date, Venue string, Symbol string, Price float, Shares integer );
CREATE MODULE FilterByPrice IN TradeData OUT FilteredTradeData BEGIN IMPORT 'schemas.ccl'; CREATE INPUT STREAM TradeData SCHEMA TradesSchema; CREATE OUTPUT STREAM FilteredTradeData SCHEMA TradesSchema AS SELECT * FROM TradeData WHERE TradeData.Price > 1.00; END;
IMPORT 'schemas.ccl'; CREATE INPUT STREAM NYSEData SCHEMA TradesSchema; LOAD MODULE FilterByPrice AS FilterOver1 IN TradeData = NYSEData OUT FilteredTradeData = NYSEPriceOver1Data;