embulk-output-db2 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -5
  3. data/classpath/{embulk-output-db2-0.8.0.jar → embulk-output-db2-0.8.1.jar} +0 -0
  4. data/classpath/{embulk-output-jdbc-0.8.0.jar → embulk-output-jdbc-0.8.1.jar} +0 -0
  5. data/src/test/java/org/embulk/output/db2/BasicTest.java +164 -0
  6. data/src/test/java/org/embulk/output/db2/DB2Tests.java +106 -0
  7. data/src/test/resources/org/embulk/output/db2/test/expect/basic/setup.sql +78 -0
  8. data/src/test/resources/org/embulk/output/db2/test/expect/basic/test_char.csv +4 -0
  9. data/src/test/resources/org/embulk/output/db2/test/expect/basic/test_create_char_expected.txt +9 -0
  10. data/src/test/resources/org/embulk/output/db2/test/expect/basic/test_create_datetime_expected.txt +5 -0
  11. data/src/test/resources/org/embulk/output/db2/test/expect/basic/test_create_number_expected.txt +9 -0
  12. data/src/test/resources/org/embulk/output/db2/test/expect/basic/test_datetime.csv +4 -0
  13. data/src/test/resources/org/embulk/output/db2/test/expect/basic/test_insert_char.yml +2 -0
  14. data/src/test/resources/org/embulk/output/db2/test/expect/basic/test_insert_char_expected.txt +10 -0
  15. data/src/test/resources/org/embulk/output/db2/test/expect/basic/test_insert_create_char.yml +2 -0
  16. data/src/test/resources/org/embulk/output/db2/test/expect/basic/test_insert_create_datetime.yml +2 -0
  17. data/src/test/resources/org/embulk/output/db2/test/expect/basic/test_insert_create_number.yml +2 -0
  18. data/src/test/resources/org/embulk/output/db2/test/expect/basic/test_insert_datetime.yml +2 -0
  19. data/src/test/resources/org/embulk/output/db2/test/expect/basic/test_insert_datetime_expected.txt +6 -0
  20. data/src/test/resources/org/embulk/output/db2/test/expect/basic/test_insert_direct_char.yml +2 -0
  21. data/src/test/resources/org/embulk/output/db2/test/expect/basic/test_insert_direct_datetime.yml +2 -0
  22. data/src/test/resources/org/embulk/output/db2/test/expect/basic/test_insert_direct_number.yml +2 -0
  23. data/src/test/resources/org/embulk/output/db2/test/expect/basic/test_insert_number.yml +2 -0
  24. data/src/test/resources/org/embulk/output/db2/test/expect/basic/test_insert_number_expected.txt +6 -0
  25. data/src/test/resources/org/embulk/output/db2/test/expect/basic/test_number.csv +4 -0
  26. data/src/test/resources/org/embulk/output/db2/test/expect/basic/test_number2.csv +4 -0
  27. data/src/test/resources/org/embulk/output/db2/test/expect/basic/test_replace.yml +2 -0
  28. data/src/test/resources/org/embulk/output/db2/test/expect/basic/test_replace_create.yml +2 -0
  29. data/src/test/resources/org/embulk/output/db2/test/expect/basic/test_replace_long_name.yml +2 -0
  30. data/src/test/resources/org/embulk/output/db2/test/expect/basic/test_truncate_insert.yml +2 -0
  31. data/src/test/resources/org/embulk/output/db2/test/expect/basic/test_truncate_insert_expected.txt +5 -0
  32. metadata +31 -23
  33. data/out/test/db2/data/test-char.csv +0 -3
  34. data/out/test/db2/data/test-datetime.csv +0 -3
  35. data/out/test/db2/data/test-number.csv +0 -3
  36. data/out/test/db2/yml/test-insert-direct-char.yml +0 -27
  37. data/out/test/db2/yml/test-insert-direct-datetime.yml +0 -24
  38. data/out/test/db2/yml/test-insert-direct-number.yml +0 -27
  39. data/src/test/java/org/embulk/output/db2/DB2OutputPluginTest.java +0 -515
  40. data/src/test/resources/db2/data/test-char.csv +0 -3
  41. data/src/test/resources/db2/data/test-datetime.csv +0 -3
  42. data/src/test/resources/db2/data/test-number.csv +0 -3
  43. data/src/test/resources/db2/yml/test-insert-char.yml +0 -27
  44. data/src/test/resources/db2/yml/test-insert-datetime.yml +0 -24
  45. data/src/test/resources/db2/yml/test-insert-direct-char.yml +0 -27
  46. data/src/test/resources/db2/yml/test-insert-direct-datetime.yml +0 -24
  47. data/src/test/resources/db2/yml/test-insert-direct-number.yml +0 -27
  48. data/src/test/resources/db2/yml/test-insert-number.yml +0 -27
  49. data/src/test/resources/db2/yml/test-replace-long-name.yml +0 -27
  50. data/src/test/resources/db2/yml/test-replace.yml +0 -27
  51. data/src/test/resources/db2/yml/test-truncate-insert.yml +0 -27
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 35f5932ec20d0279ad07162ac49d817230182751
4
- data.tar.gz: 0ce183236495a93749baa57d8e99d410791226cc
3
+ metadata.gz: 16e23e576f2cb4f5c40c1293ff88864b2286db77
4
+ data.tar.gz: c4858262889efa3a229a2045eaa3304ced7c9cc3
5
5
  SHA512:
6
- metadata.gz: e30b1357db9ccd9083f2c93c6badf146e26696c2d50bc23b09d300ba85ad5943c856f731af88831adfcad6aa696da54dd9dd19e057636b3267088ee9b7b01c47
7
- data.tar.gz: 30b4b1e5a1a9fee9d6a38765e13092eded48350902ff5f68b46db9e6dcab605e4740763dab42686a2261da840317b5dafa0116739b9a686584f99f51679a864e
6
+ metadata.gz: 61d195750443e7fb567f24f811500fe8d44d884f8eb3049b9e60fe3d3d6aaf8dae7c4d51374af488f96586ca848935a50b64e41d5f3bec0b22572ffe4ccbcd9b
7
+ data.tar.gz: b4fb62f8e75b6dc070db8fe4e2c951ece38b92cd5d6a45fc51bc15de26619b746ef1dce999f776351ad8dadb9d9076fdb1d7f83c7fcb633585e779f02d0dd84a
data/README.md CHANGED
@@ -18,12 +18,12 @@ DB2 output plugins for Embulk loads records to DB2.
18
18
  - **database**: destination database name (string, required)
19
19
  - **schema**: destination schema name (string, default: use the default schema)
20
20
  - **table**: destination table name (string, required)
21
- - **create_table_constraint** table constraint added to `CREATE TABLE` statement, like `CREATE TABLE <table_name> (<column1> <type1>, <column2> <type2>, ..., <create_table_constraint>) <create_table_option>`.
22
- - **create_table_option** table option added to `CREATE TABLE` statement, like `CREATE TABLE <table_name> (<column1> <type1>, <column2> <type2>, ..., <create_table_constraint>) <create_table_option>`.
21
+ - **create_table_constraint**: table constraint added to `CREATE TABLE` statement, like `CREATE TABLE <table_name> (<column1> <type1>, <column2> <type2>, ..., <create_table_constraint>) <create_table_option>`.
22
+ - **create_table_option**: table option added to `CREATE TABLE` statement, like `CREATE TABLE <table_name> (<column1> <type1>, <column2> <type2>, ..., <create_table_constraint>) <create_table_option>`.
23
23
  - **options**: extra connection properties (hash, default: {})
24
- - **retry_limit** max retry count for database operations (integer, default: 12)
25
- - **retry_wait** initial retry wait time in milliseconds (integer, default: 1000 (1 second))
26
- - **max_retry_wait** upper limit of retry wait, which will be doubled at every retry (integer, default: 1800000 (30 minutes))
24
+ - **retry_limit**: max retry count for database operations (integer, default: 12)
25
+ - **retry_wait**: initial retry wait time in milliseconds (integer, default: 1000 (1 second))
26
+ - **max_retry_wait**: upper limit of retry wait, which will be doubled at every retry (integer, default: 1800000 (30 minutes))
27
27
  - **mode**: "insert", "insert_direct", "truncate_insert" or "replace". See below. (string, required)
28
28
  - **insert_method**: see below
29
29
  - **batch_size**: size of a single batch insert (integer, default: 16777216)
@@ -0,0 +1,164 @@
1
+ package org.embulk.output.db2;
2
+
3
+ import static org.embulk.output.db2.DB2Tests.execute;
4
+ import static org.embulk.output.db2.DB2Tests.selectRecords;
5
+ import static org.hamcrest.Matchers.is;
6
+ import static org.junit.Assert.assertThat;
7
+
8
+ import java.io.File;
9
+ import java.net.URISyntaxException;
10
+ import java.net.URL;
11
+ import java.nio.file.FileSystems;
12
+ import java.nio.file.Path;
13
+
14
+ import org.embulk.config.ConfigSource;
15
+ import org.embulk.output.DB2OutputPlugin;
16
+ import org.embulk.spi.OutputPlugin;
17
+ import org.embulk.test.EmbulkTests;
18
+ import org.embulk.test.TestingEmbulk;
19
+ import org.junit.Before;
20
+ import org.junit.Rule;
21
+ import org.junit.Test;
22
+
23
+ import com.google.common.io.Resources;
24
+
25
+ public class BasicTest
26
+ {
27
+ private static final String BASIC_RESOURCE_PATH = "org/embulk/output/db2/test/expect/basic/";
28
+
29
+ private static ConfigSource loadYamlResource(TestingEmbulk embulk, String fileName)
30
+ {
31
+ return embulk.loadYamlResource(BASIC_RESOURCE_PATH + fileName);
32
+ }
33
+
34
+ private static String readResource(String fileName)
35
+ {
36
+ return EmbulkTests.readResource(BASIC_RESOURCE_PATH + fileName);
37
+ }
38
+
39
+ @Rule
40
+ public TestingEmbulk embulk = TestingEmbulk.builder()
41
+ .registerPlugin(OutputPlugin.class, "db2", DB2OutputPlugin.class)
42
+ .build();
43
+
44
+ private ConfigSource baseConfig;
45
+
46
+ @Before
47
+ public void setup() throws Exception
48
+ {
49
+ baseConfig = DB2Tests.baseConfig();
50
+ execute(BASIC_RESOURCE_PATH + "setup.sql"); // setup rows
51
+ }
52
+
53
+ @Test
54
+ public void testInsertChar() throws Exception
55
+ {
56
+ Path in1 = toPath("test_char.csv");
57
+ TestingEmbulk.RunResult result1 = embulk.runOutput(baseConfig.merge(loadYamlResource(embulk, "test_insert_char.yml")), in1);
58
+ assertThat(selectRecords(embulk, "TEST_CHAR"), is(readResource("test_insert_char_expected.txt")));
59
+ }
60
+
61
+ @Test
62
+ public void testInsertDirectChar() throws Exception
63
+ {
64
+ Path in1 = toPath("test_char.csv");
65
+ TestingEmbulk.RunResult result1 = embulk.runOutput(baseConfig.merge(loadYamlResource(embulk, "test_insert_direct_char.yml")), in1);
66
+ assertThat(selectRecords(embulk, "TEST_CHAR"), is(readResource("test_insert_char_expected.txt")));
67
+ }
68
+
69
+ @Test
70
+ public void testInsertCreateChar() throws Exception
71
+ {
72
+ Path in1 = toPath("test_char.csv");
73
+ TestingEmbulk.RunResult result1 = embulk.runOutput(baseConfig.merge(loadYamlResource(embulk, "test_insert_create_char.yml")), in1);
74
+ assertThat(selectRecords(embulk, "TEST_CHAR2"), is(readResource("test_create_char_expected.txt")));
75
+ }
76
+
77
+ @Test
78
+ public void testReplace() throws Exception
79
+ {
80
+ Path in1 = toPath("test_char.csv");
81
+ TestingEmbulk.RunResult result1 = embulk.runOutput(baseConfig.merge(loadYamlResource(embulk, "test_replace.yml")), in1);
82
+ assertThat(selectRecords(embulk, "TEST_CHAR"), is(readResource("test_create_char_expected.txt")));
83
+ }
84
+
85
+ @Test
86
+ public void testReplaceCreate() throws Exception
87
+ {
88
+ Path in1 = toPath("test_char.csv");
89
+ TestingEmbulk.RunResult result1 = embulk.runOutput(baseConfig.merge(loadYamlResource(embulk, "test_replace_create.yml")), in1);
90
+ assertThat(selectRecords(embulk, "TEST_CHAR2"), is(readResource("test_create_char_expected.txt")));
91
+ }
92
+
93
+ @Test
94
+ public void testReplaceLongName() throws Exception
95
+ {
96
+ // table name has 128 characters
97
+ Path in1 = toPath("test_char.csv");
98
+ TestingEmbulk.RunResult result1 = embulk.runOutput(baseConfig.merge(loadYamlResource(embulk, "test_replace_long_name.yml")), in1);
99
+ assertThat(selectRecords(embulk, "TEST_CHAR_1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678"), is(readResource("test_create_char_expected.txt")));
100
+ }
101
+
102
+ @Test
103
+ public void testInsertNumber() throws Exception
104
+ {
105
+ Path in1 = toPath("test_number.csv");
106
+ TestingEmbulk.RunResult result1 = embulk.runOutput(baseConfig.merge(loadYamlResource(embulk, "test_insert_number.yml")), in1);
107
+ assertThat(selectRecords(embulk, "TEST_NUMBER"), is(readResource("test_insert_number_expected.txt")));
108
+ }
109
+
110
+ @Test
111
+ public void testInsertDirectNumber() throws Exception
112
+ {
113
+ Path in1 = toPath("test_number.csv");
114
+ TestingEmbulk.RunResult result1 = embulk.runOutput(baseConfig.merge(loadYamlResource(embulk, "test_insert_direct_number.yml")), in1);
115
+ assertThat(selectRecords(embulk, "TEST_NUMBER"), is(readResource("test_insert_number_expected.txt")));
116
+ }
117
+
118
+ @Test
119
+ public void testInsertCreateNumber() throws Exception
120
+ {
121
+ Path in1 = toPath("test_number.csv");
122
+ TestingEmbulk.RunResult result1 = embulk.runOutput(baseConfig.merge(loadYamlResource(embulk, "test_insert_create_number.yml")), in1);
123
+ assertThat(selectRecords(embulk, "TEST_NUMBER2"), is(readResource("test_create_number_expected.txt")));
124
+ }
125
+
126
+ @Test
127
+ public void testTruncateInsert() throws Exception
128
+ {
129
+ Path in1 = toPath("test_number.csv");
130
+ TestingEmbulk.RunResult result1 = embulk.runOutput(baseConfig.merge(loadYamlResource(embulk, "test_truncate_insert.yml")), in1);
131
+ assertThat(selectRecords(embulk, "TEST_NUMBER"), is(readResource("test_truncate_insert_expected.txt")));
132
+ }
133
+
134
+ @Test
135
+ public void testInsertDateTime() throws Exception
136
+ {
137
+ Path in1 = toPath("test_datetime.csv");
138
+ TestingEmbulk.RunResult result1 = embulk.runOutput(baseConfig.merge(loadYamlResource(embulk, "test_insert_datetime.yml")), in1);
139
+ assertThat(selectRecords(embulk, "TEST_DATETIME"), is(readResource("test_insert_datetime_expected.txt")));
140
+ }
141
+
142
+ @Test
143
+ public void testInsertDirectDateTime() throws Exception
144
+ {
145
+ Path in1 = toPath("test_datetime.csv");
146
+ TestingEmbulk.RunResult result1 = embulk.runOutput(baseConfig.merge(loadYamlResource(embulk, "test_insert_direct_datetime.yml")), in1);
147
+ assertThat(selectRecords(embulk, "TEST_DATETIME"), is(readResource("test_insert_datetime_expected.txt")));
148
+ }
149
+
150
+ @Test
151
+ public void testInsertCreateDateTime() throws Exception
152
+ {
153
+ Path in1 = toPath("test_datetime.csv");
154
+ TestingEmbulk.RunResult result1 = embulk.runOutput(baseConfig.merge(loadYamlResource(embulk, "test_insert_create_datetime.yml")), in1);
155
+ assertThat(selectRecords(embulk, "TEST_DATETIME2"), is(readResource("test_create_datetime_expected.txt")));
156
+ }
157
+
158
+
159
+ private Path toPath(String fileName) throws URISyntaxException
160
+ {
161
+ URL url = Resources.getResource(BASIC_RESOURCE_PATH + fileName);
162
+ return FileSystems.getDefault().getPath(new File(url.toURI()).getAbsolutePath());
163
+ }
164
+ }
@@ -0,0 +1,106 @@
1
+ package org.embulk.output.db2;
2
+
3
+ import static java.util.Locale.ENGLISH;
4
+
5
+ import java.io.File;
6
+ import java.io.IOException;
7
+ import java.net.URL;
8
+ import java.nio.charset.Charset;
9
+ import java.nio.file.FileSystem;
10
+ import java.nio.file.FileSystems;
11
+ import java.nio.file.Files;
12
+ import java.nio.file.Path;
13
+ import java.util.Arrays;
14
+ import java.util.Collections;
15
+ import java.util.List;
16
+
17
+ import org.embulk.config.ConfigSource;
18
+ import org.embulk.test.EmbulkTests;
19
+ import org.embulk.test.TestingEmbulk;
20
+
21
+ import com.google.common.base.Throwables;
22
+ import com.google.common.io.ByteStreams;
23
+
24
+ public class DB2Tests
25
+ {
26
+ public static ConfigSource baseConfig()
27
+ {
28
+ return EmbulkTests.config("EMBULK_OUTPUT_DB2_TEST_CONFIG");
29
+ }
30
+
31
+ public static void execute(String sqlName) throws Exception
32
+ {
33
+ // DB2Tests.excute takes a resource name of SQL file, doesn't take a SQL sentence as other XXXTests do.
34
+ // Because TestingEmbulk.createTempFile might create a file whose name contains ' ' and DB2 clpplus cannot read such a file.
35
+ // But if root directory name of embulk-input-db2 contains ' ', tests will fail for the same reason.
36
+ URL sqlUrl = DB2Tests.class.getResource("/" + sqlName);
37
+ execute(new File(sqlUrl.toURI()));
38
+ }
39
+
40
+ private static void execute(File sqlFile) throws Exception
41
+ {
42
+ ConfigSource config = baseConfig();
43
+ String host = config.get(String.class, "host");
44
+ String port = config.get(String.class, "port", "50000");
45
+ String user = config.get(String.class, "user");
46
+ String password = config.get(String.class, "password");
47
+ String database = config.get(String.class, "database");
48
+
49
+ boolean isWindows = File.separatorChar == '\\';
50
+ ProcessBuilder pb = new ProcessBuilder(
51
+ "clpplus." + (isWindows ? "bat" : "sh"),
52
+ user + "/" + password + "@" + host + ":" + port + "/" + database,
53
+ "@" + sqlFile.getAbsolutePath());
54
+ pb.redirectErrorStream(true);
55
+ int code;
56
+ try {
57
+ Process process = pb.start();
58
+ ByteStreams.copy(process.getInputStream(), System.out);
59
+ code = process.waitFor();
60
+ } catch (IOException | InterruptedException ex) {
61
+ throw Throwables.propagate(ex);
62
+ }
63
+ if (code != 0) {
64
+ throw new RuntimeException(String.format(ENGLISH,
65
+ "Command finished with non-zero exit code. Exit code is %d.", code));
66
+ }
67
+ }
68
+
69
+ public static String selectRecords(TestingEmbulk embulk, String tableName) throws Exception
70
+ {
71
+ Charset charset = Charset.forName("UTF8");
72
+
73
+ // cannot use TestingEmbulk.createTempFile because DB2 clpplus cannot read files whose names including ' '.
74
+ FileSystem fs = FileSystems.getDefault();
75
+ File tempDir = new File(DB2Tests.class.getResource("/org/embulk/output/db2/test").toURI());
76
+
77
+ //Path temp = embulk.createTempFile("txt");
78
+ Path temp = fs.getPath(new File(tempDir, "temp.txt").getAbsolutePath());
79
+ Files.deleteIfExists(temp);
80
+
81
+ //Path sql = embulk.createTempFile("sql");
82
+ Path sql = fs.getPath(new File(tempDir, "temp.sql").getAbsolutePath());
83
+ Files.write(sql,
84
+ Arrays.asList(
85
+ "SET LINESIZE 1000;",
86
+ "SPOOL " + temp.toString() + ";",
87
+ "SELECT * FROM " + tableName + " ORDER BY ID;",
88
+ "EXIT;"),
89
+ charset);
90
+
91
+ execute(sql.toFile());
92
+
93
+ List<String> lines = Files.readAllLines(temp, charset);
94
+ Collections.sort(lines);
95
+ StringBuilder sb = new StringBuilder();
96
+ for (String line : lines) {
97
+ line = line.trim();
98
+ if (line.isEmpty()) {
99
+ continue;
100
+ }
101
+ sb.append(line);
102
+ sb.append("\n");
103
+ }
104
+ return sb.toString();
105
+ }
106
+ }
@@ -0,0 +1,78 @@
1
+ DROP TABLE TEST_CHAR;
2
+ CREATE TABLE TEST_CHAR (
3
+ ID INT NOT NULL,
4
+ CHAR_ITEM CHAR(4),
5
+ VARCHAR_ITEM VARCHAR(8),
6
+ CLOB_ITEM CLOB,
7
+ GRAPHIC_ITEM GRAPHIC(4),
8
+ VARGRAPHIC_ITEM VARGRAPHIC(8),
9
+ NCHAR_ITEM NCHAR(4),
10
+ NVARCHAR_ITEM NVARCHAR(8),
11
+ NCLOB_ITEM NCLOB,
12
+ PRIMARY KEY (ID)
13
+ );
14
+ INSERT INTO TEST_CHAR VALUES(
15
+ 9999,
16
+ NULL,
17
+ NULL,
18
+ NULL,
19
+ NULL,
20
+ NULL,
21
+ NULL,
22
+ NULL,
23
+ NULL
24
+ );
25
+
26
+ DROP TABLE TEST_CHAR2;
27
+
28
+ DROP TABLE TEST_CHAR_1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678;
29
+
30
+ DROP TABLE TEST_NUMBER;
31
+ CREATE TABLE TEST_NUMBER (
32
+ ID INT NOT NULL,
33
+ SMALLINT_ITEM SMALLINT,
34
+ INTEGER_ITEM INTEGER,
35
+ BIGINT_ITEM BIGINT,
36
+ DECIMAL_ITEM DECIMAL(8,2),
37
+ NUMERIC_ITEM NUMERIC(8,2),
38
+ REAL_ITEM REAL,
39
+ DOUBLE_ITEM DOUBLE,
40
+ FLOAT_ITEM FLOAT,
41
+ PRIMARY KEY (ID)
42
+ );
43
+ INSERT INTO TEST_NUMBER VALUES(
44
+ 9999,
45
+ NULL,
46
+ NULL,
47
+ NULL,
48
+ NULL,
49
+ NULL,
50
+ NULL,
51
+ NULL,
52
+ NULL
53
+ );
54
+
55
+ DROP TABLE TEST_NUMBER2;
56
+
57
+ DROP TABLE TEST_DATETIME;
58
+
59
+ CREATE TABLE TEST_DATETIME (
60
+ ID CHAR(4) NOT NULL,
61
+ DATE_ITEM DATE,
62
+ TIME_ITEM TIME,
63
+ TIMESTAMP_ITEM TIMESTAMP,
64
+ TIMESTAMP0_ITEM TIMESTAMP(0),
65
+ TIMESTAMP12_ITEM TIMESTAMP(12),
66
+ PRIMARY KEY (ID)
67
+ );
68
+ INSERT INTO TEST_DATETIME VALUES(9999,
69
+ NULL,
70
+ NULL,
71
+ NULL,
72
+ NULL,
73
+ NULL
74
+ );
75
+
76
+ DROP TABLE TEST_DATETIME2;
77
+
78
+ EXIT;
@@ -0,0 +1,4 @@
1
+ ID:long,CHAR_ITEM:string,VARCHAR_ITEM:string,CLOB_ITEM:string,GRAPHIC_ITEM:string,VARGRAPHIC_ITEM:string,NCHAR_ITEM:string,NVARCHAR_ITEM:string,NCLOB_ITEM:string
2
+ 1001,aa,AA,aaaaaaaaaaaa,ああ,いいいい,aa,AA,aaaaaaaa
3
+ 1002,XXXX,XXXXXXXX,XXXXXXXXXXXXXXXX,XXXX,XXXXXXXX,XXXX,XXXXXXXX,XXXXXXXXXXXXXXXX
4
+ 1003,,,,,,,,
@@ -0,0 +1,9 @@
1
+ ID CHAR_ITEM VARCHAR_ITEM CLOB_ITEM GRAPHIC_ITEM VARGRAPHIC_ITEM NCHAR_ITEM
2
+ 1001 aa AA aaaaaaaaaaaa ああ いいいい aa
3
+ 1002 XXXX XXXXXXXX XXXXXXXXXXXXXXXX XXXX XXXXXXXX XXXX
4
+ 1003
5
+ ----------------------- ------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------
6
+ ------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------
7
+ NVARCHAR_ITEM NCLOB_ITEM
8
+ XXXXXXXX XXXXXXXXXXXXXXXX
9
+ AA aaaaaaaa
@@ -0,0 +1,5 @@
1
+ ID DATE_ITEM TIME_ITEM TIMESTAMP_ITEM TIMESTAMP0_ITEM TIMESTAMP12_ITEM
2
+ 1001 2016-09-08 00:00:00.000000 2016-01-01 12:34:45.000000 2016-09-09 12:34:45.123456 2016-09-10 12:34:45.000000 2016-09-11 12:34:45.123456
3
+ 1002 2016-12-31 00:00:00.000000 2016-01-01 23:59:59.000000 2016-12-31 23:59:59.999999 2016-12-31 23:59:59.000000 2016-12-31 23:59:59.999999
4
+ 1003
5
+ ----------------------- ------------------------------ ------------------------------ ------------------------------ ------------------------------ ------------------------------
@@ -0,0 +1,9 @@
1
+ ID SMALLINT_ITEM INTEGER_ITEM BIGINT_ITEM DECIMAL_ITEM
2
+ 1001 12345 123456789 123456789012 123456.78
3
+ 1002 -9999 -999999999 -999999999999 -999999.99
4
+ 1003
5
+ ----------------------- ----------------------- ----------------------- ----------------------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
6
+ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------- -------------------------- --------------------------
7
+ -999999.99 -9.999999 -9.999999 -9.99999999999999
8
+ 876543.21 1.23456 1.23456789012 3.45678901234
9
+ NUMERIC_ITEM REAL_ITEM DOUBLE_ITEM FLOAT_ITEM
@@ -0,0 +1,4 @@
1
+ ID:long,DATE_ITEM:timestamp,TIME_ITEM:timestamp,TIMESTAMP_ITEM:timestamp,TIMESTAMP0_ITEM:timestamp,TIMESTAMP12_ITEM:timestamp
2
+ 1001,2016-09-08 00:00:00.000 +0000,2016-01-01 12:34:45.000 +0000,2016-09-09 12:34:45.123456 +0000,2016-09-10 12:34:45.000 +0000,2016-09-11 12:34:45.123456789012 +0000
3
+ 1002,2016-12-31 00:00:00.000 +0000,2016-01-01 23:59:59.000 +0000,2016-12-31 23:59:59.999999 +0000,2016-12-31 23:59:59.000 +0000,2016-12-31 23:59:59.999999999999 +0000
4
+ 1003,,,,,
@@ -0,0 +1,2 @@
1
+ table: TEST_CHAR
2
+ mode: insert
@@ -0,0 +1,10 @@
1
+ ID CHAR_ITEM VARCHAR_ITEM CLOB_ITEM GRAPHIC_ITEM VARGRAPHIC_ITEM NCHAR_ITEM NVARCHAR_ITEM
2
+ 1001 aa AA aaaaaaaaaaaa ああ いいいい aa AA
3
+ 1002 XXXX XXXXXXXX XXXXXXXXXXXXXXXX XXXX XXXXXXXX XXXX XXXXXXXX
4
+ 1003
5
+ 9999
6
+ ------------- ---------- ------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------- ---------------- ------------------- -------------------------------------
7
+ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
8
+ NCLOB_ITEM
9
+ XXXXXXXXXXXXXXXX
10
+ aaaaaaaa