This section explains the setup file for describing the master definition (master definition file).
The master definition file is an XML file that has "master" as the root element. A master definition file is created for each unit of master data. The master data consists of a schema file and at least one data file, and is matched to a master definition file.
The master data is read when the CEP engine to which the master definition is deployed starts.
The items to be set in the master definition file are shown below:
Element or attribute | Item name | Explanation | Allowed values | Mandatory/ |
---|---|---|---|---|
id (attribute of "master") | Development asset ID | ID unique in the deployment CEP engine. | Up to 39 alphanumeric characters, underscores (_), or hyphens (-). Note: The first character must be a letter. | Mandatory |
comment | Comment | Explanation of this definition. | Up to 1,000 characters. | Optional |
schemaFile | Schema file | Full name the schema file. | Up to 1,023 bytes. | Mandatory |
dataFile | Data file | Full name of the data file. If there are multiple data files, specify multiple "dataFile" elements. Alternatively, using an absolute path, specify the directory where the data file is located. In this case, all files in the directory will be read as data files. | Up to 1,023 bytes. Note: If specifying a directory, set this so that the directory name plus the file name does not exceed 1,023 bytes. | Mandatory |
skipHeader | Skip specification | Whether to skip the first line in the data file when the item name is described in the first line of the data file. true: Assume the first line is not data (ignore). false: Assume the first line is data (default). | See Explanation. | Optional |
The schema file and data file are text files in CSV format (refer to "9.5 CSV Format Supported" for details). The character encoding for the files is UTF-8.
In a schema definition file, one or more item names are described using one record.
Refer to "9.4 Characters Allowed in Item, Tag and Attribute Names" for information on the characters that can be specified in item names.
In a data file, one line corresponds to one entry of master data.
In each line, describe values (data) that correspond to the schema file items.
If the number of data items is greater than the number of schema information items, the data will be regarded invalid.
Note
Up to 32 master definitions can be deployed to one CEP engine.
Up to 100 "dataFile" elements can be specified in one master definition. If this limit is exceeded, locate the data files in any directory and then specify the path of the directory.
If the number of data file items is less than the number of schema file items, empty strings ("") will be used in the missing items. If the number of data file items is greater, the CEP engine will fail to start.
If data files are specified using a directory path, ordinary files and symbolic links (with link destinations of ordinary files) located in the directory are read as data files. Aside from subdirectories, do not locate files other than ordinary files and symbolic links (such as named pipes and special files) in the directory.
Master data is opened in memory when the CEP engine starts. Therefore, memory is consumed in proportion to the master data size.
If master data is being updated, the CEP engine must be restarted (stopped and then started) in order to reflect the update.
Read permissions for the engine execution user must be given in the schema file and data files.
Example
Example of a schema file
/var/tmp/SchemaFile01.csv
"Kbn","Number","Code","Name","Value","Total","Biko"
Example of a data file
/var/tmp/MasterFile01.csv
"01","1001","AAA","BlockA","1,000","1,000","Comment: Memo number 4023"
"02","1001","BBB","BlockB","","1,200","Comment: Memo number 4023"
"03","1002","CCC","BlockC","800","800","Comment: Memo number 4023"
Example of a master definition file
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<master xmlns="urn:xmlns-fujitsu-com:cspf:bdcep:v1" id="MASTER_01">
<comment>Master definition_01</comment>
<schemaFile>/var/tmp/SchemaFile01.csv</schemaFile>
<dataFile>/var/tmp/MasterFile01.csv</dataFile>
<skipHeader>false</skipHeader>
</master>