embulk-output-db2 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da99692f6ba5fc11acf49dfe7275348fd02dabe1
|
4
|
+
data.tar.gz: a1a560a9bcfcf827447502293aaf0c412f3c156c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf897c8d1e64220cea7c93f9340157210124ac2c2f6de9b65b4387a670fdf408a93dc4b672f8a2c4861c54e4ba7c5b9cef1085ca724c62725142e2a4895f3b8f
|
7
|
+
data.tar.gz: 0ef887f56efda505c09c645bca67041755e25f7ab371824907187781badc461f7129674204f859bbbce641ddd31f092523da35391b56fe7d1f6d2ed39b962618
|
data/README.md
CHANGED
@@ -31,6 +31,7 @@ DB2 output plugins for Embulk loads records to DB2.
|
|
31
31
|
- **value_type**: This plugin converts input column type (embulk type) into a database type to build a INSERT statement. This value_type option controls the type of the value in a INSERT statement. (string, default: depends on the sql type of the column. Available values options are: `byte`, `short`, `int`, `long`, `double`, `float`, `boolean`, `string`, `nstring`, `date`, `time`, `timestamp`, `decimal`, `json`, `null`, `pass`)
|
32
32
|
- **timestamp_format**: If input column type (embulk type) is timestamp and value_type is `string` or `nstring`, this plugin needs to format the timestamp value into a string. This timestamp_format option is used to control the format of the timestamp. (string, default: `%Y-%m-%d %H:%M:%S.%6N`)
|
33
33
|
- **timezone**: If input column type (embulk type) is timestamp, this plugin needs to format the timestamp value into a SQL string. In this cases, this timezone option is used to control the timezone. (string, value of default_timezone option is used by default)
|
34
|
+
- **after_load**: if set, this SQL will be executed after loading all records.
|
34
35
|
|
35
36
|
### Modes
|
36
37
|
|
Binary file
|
Binary file
|
@@ -32,7 +32,7 @@ public class DB2OutputPluginTest extends AbstractJdbcOutputPluginTest
|
|
32
32
|
try {
|
33
33
|
Class.forName("com.ibm.db2.jcc.DB2Driver");
|
34
34
|
} catch (ClassNotFoundException e) {
|
35
|
-
System.err.println("Warning: you should put 'db2jcc4.jar' in 'embulk-
|
35
|
+
System.err.println("Warning: you should put 'db2jcc4.jar' in 'embulk-output-db2/driver' directory in order to test.");
|
36
36
|
return;
|
37
37
|
}
|
38
38
|
|
@@ -129,6 +129,10 @@ public class DB2OutputPluginTest extends AbstractJdbcOutputPluginTest
|
|
129
129
|
@Test
|
130
130
|
public void testInsertCreateNumber() throws Exception
|
131
131
|
{
|
132
|
+
if (!enabled) {
|
133
|
+
return;
|
134
|
+
}
|
135
|
+
|
132
136
|
String table = "TEST_NUMBER";
|
133
137
|
|
134
138
|
dropTable(table);
|
@@ -363,6 +367,10 @@ public class DB2OutputPluginTest extends AbstractJdbcOutputPluginTest
|
|
363
367
|
|
364
368
|
private void assertNumberTable(String table, int skip) throws SQLException
|
365
369
|
{
|
370
|
+
if (!enabled) {
|
371
|
+
return;
|
372
|
+
}
|
373
|
+
|
366
374
|
List<List<Object>> rows = select(table);
|
367
375
|
assertEquals(skip + 3, rows.size());
|
368
376
|
{
|
@@ -410,6 +418,10 @@ public class DB2OutputPluginTest extends AbstractJdbcOutputPluginTest
|
|
410
418
|
|
411
419
|
private void assertCharTable(String table, boolean trimming, int skip) throws SQLException
|
412
420
|
{
|
421
|
+
if (!enabled) {
|
422
|
+
return;
|
423
|
+
}
|
424
|
+
|
413
425
|
List<List<Object>> rows = select(table);
|
414
426
|
assertEquals(skip + 3, rows.size());
|
415
427
|
{
|
@@ -457,6 +469,10 @@ public class DB2OutputPluginTest extends AbstractJdbcOutputPluginTest
|
|
457
469
|
|
458
470
|
private void assertDateTimeTable(String table, int skip) throws SQLException, ParseException
|
459
471
|
{
|
472
|
+
if (!enabled) {
|
473
|
+
return;
|
474
|
+
}
|
475
|
+
|
460
476
|
List<List<Object>> rows = select(table);
|
461
477
|
assertEquals(skip + 3, rows.size());
|
462
478
|
{
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-output-db2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Inserts or updates records to a table.
|
14
14
|
email:
|
@@ -19,8 +19,8 @@ extra_rdoc_files: []
|
|
19
19
|
files:
|
20
20
|
- README.md
|
21
21
|
- build.gradle
|
22
|
-
- classpath/embulk-output-db2-0.7.
|
23
|
-
- classpath/embulk-output-jdbc-0.7.
|
22
|
+
- classpath/embulk-output-db2-0.7.1.jar
|
23
|
+
- classpath/embulk-output-jdbc-0.7.1.jar
|
24
24
|
- lib/embulk/output/db2.rb
|
25
25
|
- out/test/db2/data/test-char.csv
|
26
26
|
- out/test/db2/data/test-datetime.csv
|