embulk-output-db2 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +118 -0
  3. data/build.gradle +9 -0
  4. data/classpath/embulk-output-db2-0.7.0.jar +0 -0
  5. data/classpath/embulk-output-jdbc-0.7.0.jar +0 -0
  6. data/lib/embulk/output/db2.rb +3 -0
  7. data/out/test/db2/data/test-char.csv +3 -0
  8. data/out/test/db2/data/test-datetime.csv +3 -0
  9. data/out/test/db2/data/test-number.csv +3 -0
  10. data/out/test/db2/yml/test-insert-direct-char.yml +27 -0
  11. data/out/test/db2/yml/test-insert-direct-datetime.yml +24 -0
  12. data/out/test/db2/yml/test-insert-direct-number.yml +27 -0
  13. data/src/main/java/org/embulk/output/DB2OutputPlugin.java +89 -0
  14. data/src/main/java/org/embulk/output/db2/DB2BatchInsert.java +33 -0
  15. data/src/main/java/org/embulk/output/db2/DB2OutputConnection.java +140 -0
  16. data/src/main/java/org/embulk/output/db2/DB2OutputConnector.java +49 -0
  17. data/src/test/java/org/embulk/output/db2/DB2OutputPluginTest.java +499 -0
  18. data/src/test/resources/db2/data/test-char.csv +3 -0
  19. data/src/test/resources/db2/data/test-datetime.csv +3 -0
  20. data/src/test/resources/db2/data/test-number.csv +3 -0
  21. data/src/test/resources/db2/yml/test-insert-char.yml +27 -0
  22. data/src/test/resources/db2/yml/test-insert-datetime.yml +24 -0
  23. data/src/test/resources/db2/yml/test-insert-direct-char.yml +27 -0
  24. data/src/test/resources/db2/yml/test-insert-direct-datetime.yml +24 -0
  25. data/src/test/resources/db2/yml/test-insert-direct-number.yml +27 -0
  26. data/src/test/resources/db2/yml/test-insert-number.yml +27 -0
  27. data/src/test/resources/db2/yml/test-replace-long-name.yml +27 -0
  28. data/src/test/resources/db2/yml/test-replace.yml +27 -0
  29. data/src/test/resources/db2/yml/test-truncate-insert.yml +27 -0
  30. metadata +72 -0
@@ -0,0 +1,27 @@
1
+ in:
2
+ type: file
3
+ path_prefix: '/db2/data/test-char.csv'
4
+ parser:
5
+ charset: UTF-8
6
+ newline: CRLF
7
+ type: csv
8
+ delimiter: ','
9
+ quote: ''
10
+ columns:
11
+ - {name: ID, type: string}
12
+ - {name: CHAR_ITEM, type: string}
13
+ - {name: VARCHAR_ITEM, type: string}
14
+ - {name: CLOB_ITEM, type: string}
15
+ - {name: GRAPHIC_ITEM, type: string}
16
+ - {name: VARGRAPHIC_ITEM, type: string}
17
+ - {name: NCHAR_ITEM, type: string}
18
+ - {name: NVARCHAR_ITEM, type: string}
19
+ - {name: NCLOB_ITEM, type: string}
20
+ out:
21
+ type: db2
22
+ host: #host#
23
+ database: #database#
24
+ user: #user#
25
+ password: #password#
26
+ table: TEST_CHAR_1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678
27
+ mode: replace
@@ -0,0 +1,27 @@
1
+ in:
2
+ type: file
3
+ path_prefix: '/db2/data/test-char.csv'
4
+ parser:
5
+ charset: UTF-8
6
+ newline: CRLF
7
+ type: csv
8
+ delimiter: ','
9
+ quote: ''
10
+ columns:
11
+ - {name: ID, type: string}
12
+ - {name: CHAR_ITEM, type: string}
13
+ - {name: VARCHAR_ITEM, type: string}
14
+ - {name: CLOB_ITEM, type: string}
15
+ - {name: GRAPHIC_ITEM, type: string}
16
+ - {name: VARGRAPHIC_ITEM, type: string}
17
+ - {name: NCHAR_ITEM, type: string}
18
+ - {name: NVARCHAR_ITEM, type: string}
19
+ - {name: NCLOB_ITEM, type: string}
20
+ out:
21
+ type: db2
22
+ host: #host#
23
+ database: #database#
24
+ user: #user#
25
+ password: #password#
26
+ table: TEST_CHAR
27
+ mode: replace
@@ -0,0 +1,27 @@
1
+ in:
2
+ type: file
3
+ path_prefix: '/db2/data/test-number.csv'
4
+ parser:
5
+ charset: UTF-8
6
+ newline: CRLF
7
+ type: csv
8
+ delimiter: ','
9
+ quote: ''
10
+ columns:
11
+ - {name: ID, type: string}
12
+ - {name: SMALLINT_ITEM, type: long}
13
+ - {name: INTEGER_ITEM, type: long}
14
+ - {name: BIGINT_ITEM, type: long}
15
+ - {name: DECIMAL_ITEM, type: string}
16
+ - {name: NUMERIC_ITEM, type: string}
17
+ - {name: REAL_ITEM, type: double}
18
+ - {name: DOUBLE_ITEM, type: double}
19
+ - {name: FLOAT_ITEM, type: double}
20
+ out:
21
+ type: db2
22
+ host: #host#
23
+ database: #database#
24
+ user: #user#
25
+ password: #password#
26
+ table: TEST_NUMBER
27
+ mode: truncate_insert
metadata ADDED
@@ -0,0 +1,72 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: embulk-output-db2
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.7.0
5
+ platform: ruby
6
+ authors:
7
+ - Sadayuki Furuhashi
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-10-26 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Inserts or updates records to a table.
14
+ email:
15
+ - frsyuki@gmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - README.md
21
+ - build.gradle
22
+ - classpath/embulk-output-db2-0.7.0.jar
23
+ - classpath/embulk-output-jdbc-0.7.0.jar
24
+ - lib/embulk/output/db2.rb
25
+ - out/test/db2/data/test-char.csv
26
+ - out/test/db2/data/test-datetime.csv
27
+ - out/test/db2/data/test-number.csv
28
+ - out/test/db2/yml/test-insert-direct-char.yml
29
+ - out/test/db2/yml/test-insert-direct-datetime.yml
30
+ - out/test/db2/yml/test-insert-direct-number.yml
31
+ - src/main/java/org/embulk/output/DB2OutputPlugin.java
32
+ - src/main/java/org/embulk/output/db2/DB2BatchInsert.java
33
+ - src/main/java/org/embulk/output/db2/DB2OutputConnection.java
34
+ - src/main/java/org/embulk/output/db2/DB2OutputConnector.java
35
+ - src/test/java/org/embulk/output/db2/DB2OutputPluginTest.java
36
+ - src/test/resources/db2/data/test-char.csv
37
+ - src/test/resources/db2/data/test-datetime.csv
38
+ - src/test/resources/db2/data/test-number.csv
39
+ - src/test/resources/db2/yml/test-insert-char.yml
40
+ - src/test/resources/db2/yml/test-insert-datetime.yml
41
+ - src/test/resources/db2/yml/test-insert-direct-char.yml
42
+ - src/test/resources/db2/yml/test-insert-direct-datetime.yml
43
+ - src/test/resources/db2/yml/test-insert-direct-number.yml
44
+ - src/test/resources/db2/yml/test-insert-number.yml
45
+ - src/test/resources/db2/yml/test-replace-long-name.yml
46
+ - src/test/resources/db2/yml/test-replace.yml
47
+ - src/test/resources/db2/yml/test-truncate-insert.yml
48
+ homepage: https://github.com/embulk/embulk-output-jdbc
49
+ licenses:
50
+ - Apache 2.0
51
+ metadata: {}
52
+ post_install_message:
53
+ rdoc_options: []
54
+ require_paths:
55
+ - lib
56
+ required_ruby_version: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ required_rubygems_version: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
66
+ requirements: []
67
+ rubyforge_project:
68
+ rubygems_version: 2.4.8
69
+ signing_key:
70
+ specification_version: 4
71
+ summary: JDBC output plugin for Embulk
72
+ test_files: []