Import libraries, parameters, variables, and schema, function, and module definitions from another CCL file into a project, module, or another IMPORT file.
IMPORT 'fileName';
fileName | The absolute or relative path of the CCL text file you are importing. The relative path is relative to the file location of the file that contains the IMPORT statement. |
Any definitions used in an import file must be either defined in the file or imported by the file. Once imported, these definitions belong to the scope into which they are imported. You can use these definitions only in statements that follow the IMPORT statement.
Import files can be nested within other import files using the IMPORT statement. For example, if file A imports file B, and the project imports file A, then the project has access to every definition within A, which includes all of the definitions within B.
This example imports and uses two schemas.
//Defines Schema1 //Imported using relative paths IMPORT '../schemas/import1.ccl'; //Defines Schema2 //Imported using absolute paths IMPORT '~/project/schemas/import2.ccl'; [For UNIX-based systems] IMPORT 'C:/project/schemas/import2.ccl': [For Windows-based systems] CREATE INPUT STREAM stream1 SCHEMA Schema1; CREATE INPUT STREAM stream2 SCHEMA Schema2;