Creating an ESQL file
When you include a node in your message flow that requires ESQL code to customize its function, you must code the ESQL statements that provide the customization in an ESQL module in an ESQL file. The Compute, Database, DatabaseInput, and Filter nodes use ESQL code. You can use the same ESQL file for more than one module.
Before you begin
For background information, see ESQL overview.
Optional: You can create an application, library, or integration project before you create an ESQL file. Alternatively, you can create the containing project when you create the ESQL file.
About this task
ESQL files are stored in a file system or in a shared repository. If you are using a file system, you can use the local file system or a shared drive. If you store files in a repository, you can use any of the available repositories that are supported by Eclipse, for example CVS.
To create an ESQL file, complete the following steps.
Procedure
Results
The ESQL file opens in the editor, where you can edit the file, then save it. The ESQL file is shown in the Application Development view, beneath the ESQLs folder of the containing application, library, or integration project.
An ESQL file can also be created automatically for you. You can right-click a Compute, Database, DatabaseInput, or Filter node, then click Open ESQL. If the module identified by the appropriate property does not already exist in the broker schema, a module is created automatically. This module is created in the file <message_flow_name>.esql in the same broker schema in the same project as the <message_flow_name>.msgflow file. If that ESQL file does not already exist, that is also created for you.
The contents of a single ESQL file do not have any specific relationship with message flows and nodes. It is your decision which modules are created in which files (unless the specified module, identified by the appropriate property, is created by default in the file <message_flow_name>.esql as described above). Monitor the size and complexity of the ESQL in each file, and split the file if it becomes difficult to view or manage.
If you create reusable subroutines (at broker schema level) in an ESQL file, you might want to refer to these routines from ESQL modules in another project. To refer to the routines, specify that the project that runs the subroutines depends on the project in which the ESQL file containing them is defined. You can specify this behavior when you create the second project, or you can create a project reference; see Referencing resources in other libraries.