Add SQL files
Use BladeSmith to add custom SQL commands to the scripts that describe a DataBlade® module and its objects. You can include SQL commands to create tables, indexes, or SPL procedures your DataBlade module requires.
For example, if your DataBlade module uses smart large objects, you can include a statement to test for the required sbspace when you register the DataBlade module.
Use the three-character new object prefix assigned to your project in the name of every custom SQL object you create. The maximum size of an SQL file is 20 KB.
If you create any objects for your DataBlade module, add corresponding SQL DROP statements so that the objects are dropped when your DataBlade module is unregistered.
To add custom SQL, start the wizard by choosing
. Enter SQL commands directly into the BladeSmith edit window, or import a disk file into the BladeSmith project. When you import a file, copy the contents of the file at the time you import, or import the file by reference so that its contents are copied whenever you generate SQL scripts.Property | Default value | Description |
---|---|---|
Descriptive name | SQLfile | A descriptive name for the custom SQL statements. |
Read SQL text from file | None | Use to import SQL statements into the CREATE and
DROP fields or to import by reference. See Import SQL text from a file for more information. |
Custom SQL CREATE text | None | A text field in which to type SQL CREATE statements. |
Custom SQL DROP text | None | A text field in which to type SQL DROP statements. |
Depends on objects | None | A list of objects on which the custom SQL depends. See Object dependencies for more information. |
Which objects require SQL | None | A list of objects that depend on the custom SQL. See Object dependencies for more information. |
The following sections describe properties of custom SQL files.