You specify a format conversion definition (FormatDefinition tag) as a child element of a CB definition for editing (DataEditCBDefinition tag) described in 9.9.3 CB definition for editing.
For details about format conversion processing, see 10.2.2(3) Format conversion or 10.6.2(4) Format conversion.
<FormatDefinition ioType="{INPUT|OUTPUT}"> |
Format number | Format of character string representation | Format |
---|---|---|
1 (default value) | year-month-day hour:minute:second.millisecond (1 to 9 digits) | yyyy-MM-dd HH:mm:ss.fffffffff |
2#1 | month-name#2 day hour:minute:second | MMM dd HH:mm:ss |
3 | year/month/day hour:minute:second.millisecond (3 digits) | yyyy/MM/dd HH:mm:ss.SSS |
4 | day/month-name#2/year:hour:minute:second | dd/MMM/yyyy:HH:mm:ss |
<?xml version="1.0" encoding="UTF-8"?> |
If you specify format number 2 in the timestampformat attribute in the format tag for input adaptors and you specify both year and month attributes in the format tag, the start year and month for a field of the TIMESTAMP data type are determined as follows:
For the second and subsequent input records, the start year and month are determined by comparing the month value in a field of the input record with the reference year-month, as described below.
The figure below shows an example where the reference year-month is set to year Y and month 4. If the month value in a field of the input record is in the range from 3 to 12, the year value for the field becomes Y. If the month value is 1 or 2, the year value for the field becomes Y + 1.
Figure 9-3 Example when the reference year-month is set to year Y and month 4
The figure below shows an example where the reference year-month is set to year Y and month 1. If the month value in a field of the input record is 12, the year value for the field becomes Y - 1. If the month value is in the range from 1 to 11, the year value for the field becomes Y.
Figure 9-4 Example when the reference year-month is set to year Y and month 1
This subsection discusses the format of the record structure that is specified in the exp attribute in the record tag.
{[delimiter]($field-name)[delimiter] |
"($_F1),($_F2),($_F3),($_F4),($_F5)" |
"<($_F1)> MSG($_F2) ($_F3)" |
The table below shows the correspondences between the values of the type attribute in the field tag and the Java and CQL data types.
For the rules for representing the data types, see the rules for data types for the pattern attribute in the field tag. For details about the CQL data types, see the manual uCosminexus Stream Data Platform - Application Framework Application Development Guide.
Table 9-12 Values of the type attribute and the corresponding Java and CQL data types
No. | Data type (value of type attribute) | Classification | Data type | Java data type | CQL data type |
---|---|---|---|---|---|
1 | INT | Numeric data | 4-byte integer | Primitive type int | INT[EGER] |
2 | SHORT | 2-byte integer | Primitive type short | SMALLINT | |
3 | BYTE | 1-byte integer | Primitive type byte | TINYINT | |
4 | LONG | 8-byte integer | Primitive type long | BIGINT | |
5 | BIG_DECIMAL | Fixed-point number | java.math.BigDecimal class | DEC[IMAL]#1 NUMERIC#1 | |
6 | DECIMAL(m)#2 NUMERIC(m)#2 | ||||
7 | FLOAT | 4-byte real number | Primitive type float | REAL | |
8 | DOUBLE | 8-byte real number | Primitive type double | FLOAT DOUBLE | |
9 | STRING | Character data | Character string | java.lang.String class | CHAR[ACTER]#3 |
10 | CHAR[ACTER](n)#4 VARCHAR(p)#5 | ||||
11 | DATE | Date/time data | Date (year-month-day) | java.sql.Date class | DATE |
12 | TIME | Time (hour-minute-second) | java.sql.Time class | TIME | |
13 | TIMESTAMP | Date and time (year- month- day + hour-minute-second + millisecond) | java.sql.Timestamp class | TIMESTAMP#6 | |
14 | TIMESTAMP[(q)]#7 |
The table below describes the rules for representing data types when the pattern attribute is omitted from the field tag.
Table 9-13 Rules for representing data types when the pattern attribute is omitted from the field tag
No. | Data type (value of type attribute) | Pattern for data type (regular expression) | Description | Whether or not changeable# |
---|---|---|---|---|
1 | INT | "[-]{0,1}[0-9]+" | In this character string pattern, one minus sign (-) or no minus signs appears at the beginning, and a number in the range from 0 to 9 appears once or more. | N |
2 | SHORT | N | ||
3 | BYTE | N | ||
4 | LONG | N | ||
5 | BIG_DECIMAL | "[-]{0,1}[0-9]+\.[0-9]+" | In this character string pattern:
| N |
6 | FLOAT | "[-]{0,1}[0-9]+\.[0-9]+" | In this character string pattern:
| N |
7 | DOUBLE | N | ||
8 | STRING | "[^, ;]*" | In this character string pattern, a character other than the space, comma (,), or semicolon (;) appears repeatedly. If the data type is STRING, you can change (specify) the pattern.
| Y |
9 | DATE | "[0-9]{1,4}-[0-9]{1,2}-[0-9]{1,2}" | This is a character string pattern in the format yyyy-mm-dd. The permitted characters are shown below; only the number of digits is checked.
| N |
10 | TIME | "[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}" | This is a character string pattern in the format hh:mm:ss. The permitted characters are shown below; only the number of digits is checked.
| N |
11 | TIMESTAMP | The pattern depends on the value of the timestampformat attribute in the records tag, as described below.
| The pattern depends on the value of the timestampformat attribute in the records tag, as described below.
| N |