embulk-output-oracle 0.4.0 → 0.4.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.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +160 -160
  3. data/build.gradle +6 -6
  4. data/classpath/{embulk-output-jdbc-0.4.0.jar → embulk-output-jdbc-0.4.1.jar} +0 -0
  5. data/classpath/{embulk-output-oracle-0.4.0.jar → embulk-output-oracle-0.4.1.jar} +0 -0
  6. data/lib/embulk/output/oracle.rb +3 -3
  7. data/src/main/cpp/common/dir-path-load.cpp +424 -424
  8. data/src/main/cpp/common/dir-path-load.h +36 -36
  9. data/src/main/cpp/common/embulk-output-oracle.cpp +196 -196
  10. data/src/main/cpp/common/org_embulk_output_oracle_oci_OCI.h +77 -77
  11. data/src/main/cpp/linux/build.sh +21 -21
  12. data/src/main/cpp/win/build.bat +31 -31
  13. data/src/main/cpp/win/dllmain.cpp +25 -25
  14. data/src/main/cpp/win/embulk-output-oracle.sln +39 -39
  15. data/src/main/cpp/win/embulk-output-oracle.vcxproj +175 -175
  16. data/src/main/java/org/embulk/output/OracleOutputPlugin.java +153 -153
  17. data/src/main/java/org/embulk/output/oracle/DirectBatchInsert.java +290 -290
  18. data/src/main/java/org/embulk/output/oracle/InsertMethod.java +8 -8
  19. data/src/main/java/org/embulk/output/oracle/OracleCharset.java +32 -32
  20. data/src/main/java/org/embulk/output/oracle/OracleOutputConnection.java +165 -165
  21. data/src/main/java/org/embulk/output/oracle/OracleOutputConnector.java +49 -49
  22. data/src/main/java/org/embulk/output/oracle/TimestampFormat.java +37 -37
  23. data/src/main/java/org/embulk/output/oracle/oci/ColumnDefinition.java +26 -26
  24. data/src/main/java/org/embulk/output/oracle/oci/OCI.java +139 -139
  25. data/src/main/java/org/embulk/output/oracle/oci/OCIManager.java +64 -64
  26. data/src/main/java/org/embulk/output/oracle/oci/OCIWrapper.java +96 -96
  27. data/src/main/java/org/embulk/output/oracle/oci/RowBuffer.java +105 -105
  28. data/src/main/java/org/embulk/output/oracle/oci/TableDefinition.java +24 -24
  29. data/src/test/cpp/common/embulk-output-oracle-test.cpp +69 -69
  30. data/src/test/cpp/linux/build.sh +19 -19
  31. data/src/test/cpp/win/build.bat +28 -28
  32. data/src/test/cpp/win/embulk-output-oracle-test.vcxproj +154 -154
  33. data/src/test/java/org/embulk/input/filesplit/LocalFileSplitInputPlugin.java +187 -187
  34. data/src/test/java/org/embulk/input/filesplit/PartialFile.java +49 -49
  35. data/src/test/java/org/embulk/input/filesplit/PartialFileInputStream.java +154 -154
  36. data/src/test/java/org/embulk/output/oracle/ChildFirstClassLoader.java +42 -42
  37. data/src/test/java/org/embulk/output/oracle/EmbulkPluginTester.java +124 -120
  38. data/src/test/java/org/embulk/output/oracle/EmptyConfigSource.java +105 -100
  39. data/src/test/java/org/embulk/output/oracle/OracleOutputPluginTest.java +38 -14
  40. data/src/test/java/org/embulk/output/oracle/OracleOutputPluginTestImpl.java +540 -484
  41. data/src/test/java/org/embulk/output/oracle/TimestampFormatTest.java +57 -57
  42. data/src/test/resources/data/test1/test1.csv +3 -3
  43. data/src/test/resources/yml/test-insert-direct-direct-method.yml +26 -0
  44. data/src/test/resources/yml/test-insert-direct-empty.yml +25 -0
  45. data/src/test/resources/yml/{test-insert-oci-split.yml → test-insert-direct-oci-method-split.yml} +28 -28
  46. data/src/test/resources/yml/{test-insert-oci.yml → test-insert-direct-oci-method.yml} +28 -28
  47. data/src/test/resources/yml/test-insert-direct.yml +25 -26
  48. data/src/test/resources/yml/test-insert-empty.yml +27 -0
  49. data/src/test/resources/yml/test-insert.yml +27 -25
  50. data/src/test/resources/yml/test-replace-empty.yml +31 -0
  51. data/src/test/resources/yml/test-replace-long-name-multibyte.yml +31 -31
  52. data/src/test/resources/yml/test-replace-long-name.yml +31 -31
  53. data/src/test/resources/yml/test-replace.yml +31 -31
  54. data/src/test/resources/yml/test-string-timestamp.yml +28 -28
  55. data/src/test/resources/yml/test-url.yml +24 -24
  56. metadata +10 -6
@@ -1,31 +1,31 @@
1
- in:
2
- type: file
3
- path_prefix: '/data/test1/test1.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: VARCHAR2_ITEM, type: string}
13
- - {name: INTEGER_ITEM, type: long}
14
- - {name: NUMBER_ITEM, type: string}
15
- - {name: DATE_ITEM, type: timestamp, format: '%Y/%m/%d'}
16
- - {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
17
- out:
18
- type: oracle
19
- host: localhost
20
- database: TESTDB
21
- user: TEST_USER
22
- password: test_pw
23
- table: TEST12345678901234567890
24
- mode: replace
25
- column_options:
26
- VARCHAR2_ITEM: {type: 'VARCHAR2(40)'}
27
- INTEGER_ITEM: {type: 'NUMBER(4,0)'}
28
- NUMBER_ITEM: {type: 'NUMBER(10,2)'}
29
- DATE_ITEM: {type: 'DATE'}
30
- TIMESTAMP_ITEM: {type: 'TIMESTAMP'}
31
- #driver_path: driver/ojdbc7.jar
1
+ in:
2
+ type: file
3
+ path_prefix: '/data/test1/test1.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: VARCHAR2_ITEM, type: string}
13
+ - {name: INTEGER_ITEM, type: long}
14
+ - {name: NUMBER_ITEM, type: string}
15
+ - {name: DATE_ITEM, type: timestamp, format: '%Y/%m/%d'}
16
+ - {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
17
+ out:
18
+ type: oracle
19
+ host: localhost
20
+ database: TESTDB
21
+ user: TEST_USER
22
+ password: test_pw
23
+ table: TEST12345678901234567890
24
+ mode: replace
25
+ column_options:
26
+ VARCHAR2_ITEM: {type: 'VARCHAR2(40)'}
27
+ INTEGER_ITEM: {type: 'NUMBER(4,0)'}
28
+ NUMBER_ITEM: {type: 'NUMBER(10,2)'}
29
+ DATE_ITEM: {type: 'DATE'}
30
+ TIMESTAMP_ITEM: {type: 'TIMESTAMP'}
31
+ #driver_path: driver/ojdbc7.jar
@@ -1,31 +1,31 @@
1
- in:
2
- type: file
3
- path_prefix: '/data/test1/test1.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: VARCHAR2_ITEM, type: string}
13
- - {name: INTEGER_ITEM, type: long}
14
- - {name: NUMBER_ITEM, type: string}
15
- - {name: DATE_ITEM, type: timestamp, format: '%Y/%m/%d'}
16
- - {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
17
- out:
18
- type: oracle
19
- host: localhost
20
- database: TESTDB
21
- user: TEST_USER
22
- password: test_pw
23
- table: TEST12345678901234567890123456
24
- mode: replace
25
- column_options:
26
- VARCHAR2_ITEM: {type: 'VARCHAR2(40)'}
27
- INTEGER_ITEM: {type: 'NUMBER(4,0)'}
28
- NUMBER_ITEM: {type: 'NUMBER(10,2)'}
29
- DATE_ITEM: {type: 'DATE'}
30
- TIMESTAMP_ITEM: {type: 'TIMESTAMP'}
31
- #driver_path: driver/ojdbc7.jar
1
+ in:
2
+ type: file
3
+ path_prefix: '/data/test1/test1.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: VARCHAR2_ITEM, type: string}
13
+ - {name: INTEGER_ITEM, type: long}
14
+ - {name: NUMBER_ITEM, type: string}
15
+ - {name: DATE_ITEM, type: timestamp, format: '%Y/%m/%d'}
16
+ - {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
17
+ out:
18
+ type: oracle
19
+ host: localhost
20
+ database: TESTDB
21
+ user: TEST_USER
22
+ password: test_pw
23
+ table: TEST12345678901234567890123456
24
+ mode: replace
25
+ column_options:
26
+ VARCHAR2_ITEM: {type: 'VARCHAR2(40)'}
27
+ INTEGER_ITEM: {type: 'NUMBER(4,0)'}
28
+ NUMBER_ITEM: {type: 'NUMBER(10,2)'}
29
+ DATE_ITEM: {type: 'DATE'}
30
+ TIMESTAMP_ITEM: {type: 'TIMESTAMP'}
31
+ #driver_path: driver/ojdbc7.jar
@@ -1,31 +1,31 @@
1
- in:
2
- type: file
3
- path_prefix: '/data/test1/test1.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: VARCHAR2_ITEM, type: string}
13
- - {name: INTEGER_ITEM, type: long}
14
- - {name: NUMBER_ITEM, type: string}
15
- - {name: DATE_ITEM, type: timestamp, format: '%Y/%m/%d'}
16
- - {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
17
- out:
18
- type: oracle
19
- host: localhost
20
- database: TESTDB
21
- user: TEST_USER
22
- password: test_pw
23
- table: TEST1
24
- mode: replace
25
- column_options:
26
- VARCHAR2_ITEM: {type: 'VARCHAR2(40)'}
27
- INTEGER_ITEM: {type: 'NUMBER(4,0)'}
28
- NUMBER_ITEM: {type: 'NUMBER(10,2)'}
29
- DATE_ITEM: {type: 'DATE'}
30
- TIMESTAMP_ITEM: {type: 'TIMESTAMP'}
31
- #driver_path: driver/ojdbc7.jar
1
+ in:
2
+ type: file
3
+ path_prefix: '/data/test1/test1.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: VARCHAR2_ITEM, type: string}
13
+ - {name: INTEGER_ITEM, type: long}
14
+ - {name: NUMBER_ITEM, type: string}
15
+ - {name: DATE_ITEM, type: timestamp, format: '%Y/%m/%d'}
16
+ - {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
17
+ out:
18
+ type: oracle
19
+ host: localhost
20
+ database: TESTDB
21
+ user: TEST_USER
22
+ password: test_pw
23
+ table: TEST1
24
+ mode: replace
25
+ column_options:
26
+ VARCHAR2_ITEM: {type: 'VARCHAR2(40)'}
27
+ INTEGER_ITEM: {type: 'NUMBER(4,0)'}
28
+ NUMBER_ITEM: {type: 'NUMBER(10,2)'}
29
+ DATE_ITEM: {type: 'DATE'}
30
+ TIMESTAMP_ITEM: {type: 'TIMESTAMP'}
31
+ #driver_path: driver/ojdbc7.jar
@@ -1,28 +1,28 @@
1
- in:
2
- type: file
3
- path_prefix: '/data/test1/test1.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: VARCHAR2_ITEM, type: string}
13
- - {name: INTEGER_ITEM, type: long}
14
- - {name: NUMBER_ITEM, type: string}
15
- - {name: DATE_ITEM, type: string}
16
- - {name: TIMESTAMP_ITEM, type: string}
17
- out:
18
- type: oracle
19
- host: localhost
20
- database: TESTDB
21
- user: TEST_USER
22
- password: test_pw
23
- table: TEST1
24
- mode: insert_direct
25
- column_options:
26
- DATE_ITEM: {value_type: pass}
27
- TIMESTAMP_ITEM: {value_type: pass}
28
- #driver_path: driver/ojdbc7.jar
1
+ in:
2
+ type: file
3
+ path_prefix: '/data/test1/test1.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: VARCHAR2_ITEM, type: string}
13
+ - {name: INTEGER_ITEM, type: long}
14
+ - {name: NUMBER_ITEM, type: string}
15
+ - {name: DATE_ITEM, type: string}
16
+ - {name: TIMESTAMP_ITEM, type: string}
17
+ out:
18
+ type: oracle
19
+ host: localhost
20
+ database: TESTDB
21
+ user: TEST_USER
22
+ password: test_pw
23
+ table: TEST1
24
+ mode: insert_direct
25
+ column_options:
26
+ DATE_ITEM: {value_type: pass}
27
+ TIMESTAMP_ITEM: {value_type: pass}
28
+ #driver_path: driver/ojdbc7.jar
@@ -1,24 +1,24 @@
1
- in:
2
- type: file
3
- path_prefix: '/data/test1/test1.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: VARCHAR2_ITEM, type: string}
13
- - {name: INTEGER_ITEM, type: long}
14
- - {name: NUMBER_ITEM, type: string}
15
- - {name: DATE_ITEM, type: timestamp, format: '%Y/%m/%d'}
16
- - {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
17
- out:
18
- type: oracle
19
- user: TEST_USER
20
- password: test_pw
21
- table: TEST1
22
- mode: insert_direct
23
- #driver_path: driver/ojdbc7.jar
24
- url: jdbc:oracle:thin:@localhost:1521:TESTDB
1
+ in:
2
+ type: file
3
+ path_prefix: '/data/test1/test1.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: VARCHAR2_ITEM, type: string}
13
+ - {name: INTEGER_ITEM, type: long}
14
+ - {name: NUMBER_ITEM, type: string}
15
+ - {name: DATE_ITEM, type: timestamp, format: '%Y/%m/%d'}
16
+ - {name: TIMESTAMP_ITEM, type: timestamp, format: '%Y/%m/%d %H:%M:%S'}
17
+ out:
18
+ type: oracle
19
+ user: TEST_USER
20
+ password: test_pw
21
+ table: TEST1
22
+ mode: insert_direct
23
+ #driver_path: driver/ojdbc7.jar
24
+ url: jdbc:oracle:thin:@localhost:1521:TESTDB
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-output-oracle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.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: 2015-06-11 00:00:00.000000000 Z
11
+ date: 2015-07-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Inserts or updates records to a table.
14
14
  email:
@@ -58,17 +58,21 @@ files:
58
58
  - src/test/java/org/embulk/output/oracle/OracleOutputPluginTestImpl.java
59
59
  - src/test/java/org/embulk/output/oracle/TimestampFormatTest.java
60
60
  - src/test/resources/data/test1/test1.csv
61
+ - src/test/resources/yml/test-insert-direct-direct-method.yml
62
+ - src/test/resources/yml/test-insert-direct-empty.yml
63
+ - src/test/resources/yml/test-insert-direct-oci-method-split.yml
64
+ - src/test/resources/yml/test-insert-direct-oci-method.yml
61
65
  - src/test/resources/yml/test-insert-direct.yml
62
- - src/test/resources/yml/test-insert-oci-split.yml
63
- - src/test/resources/yml/test-insert-oci.yml
66
+ - src/test/resources/yml/test-insert-empty.yml
64
67
  - src/test/resources/yml/test-insert.yml
68
+ - src/test/resources/yml/test-replace-empty.yml
65
69
  - src/test/resources/yml/test-replace-long-name-multibyte.yml
66
70
  - src/test/resources/yml/test-replace-long-name.yml
67
71
  - src/test/resources/yml/test-replace.yml
68
72
  - src/test/resources/yml/test-string-timestamp.yml
69
73
  - src/test/resources/yml/test-url.yml
70
- - classpath/embulk-output-jdbc-0.4.0.jar
71
- - classpath/embulk-output-oracle-0.4.0.jar
74
+ - classpath/embulk-output-jdbc-0.4.1.jar
75
+ - classpath/embulk-output-oracle-0.4.1.jar
72
76
  homepage: https://github.com/embulk/embulk-output-jdbc
73
77
  licenses:
74
78
  - Apache 2.0